Re: [PATCH 01 of 16] remove nr_scan_inactive/active

Andrew Morton
2007-06-29T01:29:47Z

On Thu, 28 Jun 2007 21:20:40 -0400
Rik van Riel <riel@redhat.com> wrote:

> > But for now, the question is: is this a reasonable overall design? Back
> > off from contention points, block at the top-level, polling for allocatable
> > memory to turn up?
>
> I'm not convinced. If we have already reclaimed some
> pages from the inactive list, why wait in congestion_wait()
> AT ALL?

Well by top-level I meant top-level. The point where we either block or
declare oom.

We do that now in alloc_pages(), correctly I believe.

The congestion_wait()s in vmscan.c might be misplaced (ie: too far down)
because they could lead to us blocking when some memory actually got freed
up (or became freeable?) somewhere else.

To fix that we'd need to take a global look at things from within
direct-reclaim, or back out of direct-reclaim back up to alloc_pages(), but
remember where we were up to for the next pass. Perhaps by extending
scan_control a bit and moving its instantiation up to __alloc_pages().