Re: [RFC] Arch option to touch newly allocated pages

Daniel Phillips
2002-03-07T14:27:35Z

On March 7, 2002 03:04 pm, yodaiken@fsmlabs.com wrote:
> On Thu, Mar 07, 2002 at 02:36:08PM +0100, Daniel Phillips wrote:
> > On March 7, 2002 02:49 pm, Alan Cox wrote:
> > > Jeff Dike Apparently wrote
> > > > caller. This is actually wrong because in this failure case, it effectively
> > > > changes the semantics of GFP_USER, GFP_KERNEL, and the other blocking GFP_*
> > > > allocations to GFP_ATOMIC. And that's what forced UML to segfault the
> > > > compilations.
> > >
> > > GFP_KERNEL will sometimes return NULL.
> >
> > Sad but true. IMHO we are on track to fix that in this kernel cycle, with
> > better locked/dirty accounting and rmap to forcibly unmap pages when necessary.
>
> Why is that a fix? And how can it work?

Since there is always at least one freeable page in the system (or we're oom) then
we just have to find it and we know we can forcibly unmap it. We do need to know
the total of pinned pages, I should have said locked/dirty/pinned.

Since GFP_KERNEL includes __GFP_WAIT, we are even allowed to wait for dirty page
writeout.

--
Daniel