Re: RFC: COW for hugepages

From: Andrew Morton
Date: Wed Apr 07 2004 - 22:27:31 EST


David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > I don't see much in the COW code which is ppc64-specific. All the hardware
> > needs to do is to provide a way to make the big pages readonly. With a bit
> > of an abstraction for the TLB manipulation in there it should be pretty
> > straightforward.
> >
> > Certainly worth the attempt, no?
>
> Yes, you have a point. However doing it in a cross-arch way will
> require building more of a shared abstraction about hugepage pte
> entries that exists currently. And that will mean making significant
> changes to all the archs to create that abstraction. I don't know
> enough about the other archs to be confident of debugging such
> changes, but I'll see what I can do.

Well the first step is to consolidate the existing duplication in 2.6.5
before thinking about new features. That's largely a cut-n-paste job which
I've been meaning to get onto but alas have not. I don't want to dump it
on you just because you want to tend to your COWs so if you have other
things to do, please let me know.

We could use the `weak' attribute in mm/hugetlbpage.c for those cases where
one arch really needs to do something different.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/