Re: [RFC 0/7] Postphone reclaim laundry to write at high water marks

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Arcangeli
Date: Thursday, August 23, 2007 - 5:05 am

On Tue, Aug 21, 2007 at 03:32:25PM -0700, Christoph Lameter wrote:

Can you simply tweak on the may_writepage flag only to achieve the
second pass? We're talking here about a totally non-performance case,
almost impossible to hit in practice unless you do real weird things,
and certainly very unlikely to happen. So I'm unsure what's all that
complexity just to make a regular pass on the lru looking for clean
pages, something may_writepage=0 already does.

Like Andi said at most one may_writepage=0 recursion should be
allowed.

If the PF_MEMALLOC is found empty, I agree entering reclaim a second
time with may_writepage=0 sounds theoretically a good idea (in
practice it should never be necessary). printk must also be printed to
warn the user he was risking to deadlock for real and he has to
increase the min_free_kbytes.


A new lru for this sounds overkill to me, we're talking about deadlock
avoidance, this has absolutely nothing to do with real life 99.9999%
of runtime of all kernels out there.


What does buy you to think about other threads? The whole trouble is
that PF_MEMALLOC is global, no matter which thread (pdflush like other
email to Andi or kswapd here) still it'll deadlock the same way. If
your intent is to limit the max number of in-flight writepage that
could be achieved with a sempahore, not by context switching for no
good reason. kswapd is needed for atomic allocations and to pipeline
the VM so that the vm runs more likely asynchronous inside kswapd.


That sounds a bit risky, there are latency considerations here to
make, GFP_ATOMIC will run with irq locally disabled and it may hang
for indefinite amount of time (O(N)). So irq latency may break and it
may be better to lose a packet once in a while than to hang
interrupts. If you want to do this you'd probably need to add a new
GFP_ATOMIC_RECLAIM or similar.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC 0/7] Postphone reclaim laundry to write at high water ..., Christoph Lameter, (Mon Aug 20, 2:50 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 1:48 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 1:59 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 2:03 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 2:29 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 2:30 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 3:32 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Tue Aug 21, 3:43 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Wed Aug 22, 12:04 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Wed Aug 22, 12:19 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Wed Aug 22, 1:16 pm)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Andrea Arcangeli, (Thu Aug 23, 5:05 am)
Re: [RFC 0/7] Postphone reclaim laundry to write at high w ..., Christoph Lameter, (Thu Aug 23, 1:23 pm)