Re: Page allocator: Single Zone optimizations

Andrew Morton
2006-10-28T02:24:29Z

On Fri, 27 Oct 2006 19:12:16 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> On Fri, 27 Oct 2006, Andrew Morton wrote:
>
> > On Fri, 27 Oct 2006 18:00:42 -0700 (PDT)
> > Christoph Lameter <clameter@sgi.com> wrote:
> >
> > > But I cannot find any justification in my contexts to complete work on
> > > this functionality because plainly all the hardware that I use does not
> > > have problem laden DMA controllers and works just fine with a single
> > > zone.
> >
> > How about memory hot-unplug?
>
> Cannot figure out how that relates to what I said above.

We need some way of preventing unreclaimable kernel memory allocations from
using certain physical pages. That means zones.

> Memory hot unplug
> seems to have been dropped in favor of baloons.

Has it? I don't recall seeing a vague proposal, let alone an implementation?

> > The only feasible way we're going to implement that is to support it on
> > user allocations only. IOW: for all those allocations which were performed
> > with __GFP_HIGHMEM.
>
> The alloc_page_range() functionality was intended for device drivers and
> other ZONE_DMA users. I am not sure what the point is of user space
> having the ability to allocate memory in specific physical memory areas.

Userspace allocations are reclaimable: pagecache, anonymous memory. These
happen to be allocated with __GFP_HIGHMEM set.

So right now __GFP_HIGHMEM is an excellent hint telling the page allocator
that it is safe to satisfy this request from removeable memory.