Re: [PATCH] vmscan: limit concurrent reclaimers in shrink_zone

From: Rik van Riel
Date: Mon Dec 14 2009 - 09:52:40 EST


On 12/14/2009 08:14 AM, Christoph Hellwig wrote:
On Thu, Dec 10, 2009 at 06:56:26PM -0500, Rik van Riel wrote:

It should be possible to avoid both of those issues at once, by
simply limiting how many processes are active in the page reclaim
code simultaneously.


This sounds like a very good argument against using direct reclaim at
all.

Not completely possible. Processes that call try_to_free_pages
without __GFP_FS or __GFP_IO in their gfp_flags may be holding
some kind of lock that kswapd could end up waiting on.

That means those tasks cannot wait on kswapd, because a deadlock
could happen.

Having said that, maybe we can get away with making direct
reclaim a limited subset of what it does today. Kswapd could
be the only process scanning and unmapping ptes, submitting
IOs and scanning the active list. Direct reclaim could limit
itself to reclaiming clean inactive pages and sleeping in
congestion_wait().

--
All rights reversed.
--
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/