Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Zijlstra <a.p.zijlstra@...>
Cc: Christoph Lameter <clameter@...>, <linux-mm@...>, <linux-kernel@...>, <akpm@...>, <dkegel@...>, David Miller <davem@...>, Daniel Phillips <phillips@...>
Date: Wednesday, August 15, 2007 - 11:29 pm

On Wed, Aug 15, 2007 at 03:12:06PM +0200, Peter Zijlstra wrote:

Well perhaps it doesn't work for networked swap, because dirty accounting
doesn't work the same way with anonymous memory... but for _filesystems_,
right?

I mean, it intuitively seems like a good idea to terminate the recursive
allocation problem with an attempt to reclaim clean pages rather than
immediately let them have-at our memory reserve that is used for other
things as well. Any and all writepage() via reclaim is allowed to eat
into all of memory (I hate that writepage() ever has to use any memory,
and have prototyped how to fix that for simple block based filesystems
in fsblock, but others will require it).



Well of course it doesn't, but it is a pragmatic way to reduce some
memory depletion cases. I don't see too much harm in it (although I didn't
see the 20% suggestion?)


 
Well yeah I think you simply have to reserve a minimum amount of memory in
order to reclaim a page, and I don't see any other way to do it other than
what you describe to be _technically_ deadlock free.

But firstly, you don't _want_ to start dropping packets when you hit a tough
patch in reclaim -- even if you are strictly deadlock free. And secondly,
I think recursive reclaim could reduce the deadlocks in practice which is
not a bad thing as your patches aren't merged.

How are your deadlock patches going anyway? AFAIK they are mostly a network
issue and I haven't been keeping up with them for a while. Do you really need
networked swap and actually encounter the deadlock, or is it just a question of
wanting to fix the bugs? If the former, what for, may I ask?



Although you will quite likely have at least a couple of MB worth of
clean program text. The important part of recursive reclaim is that it
doesn't so easily allow reclaim to blow all memory reserves (including
interrupt context). Sure you still have theoretical deadlocks, but if
I understand correctly, they are going to be lessened. I would be
really interested to see if even just these recursive reclaim patches
eliminate the problem in practice.



Thanks!

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Tue Aug 14, 10:21 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Daniel Phillips, (Wed Sep 5, 5:20 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Wed Sep 5, 6:42 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Daniel Phillips, (Wed Sep 5, 12:16 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Mon Sep 10, 3:25 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Mon Sep 10, 3:55 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Mon Sep 10, 4:22 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Mon Sep 10, 4:48 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Pavel Machek, (Fri Oct 26, 1:44 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Daniel Phillips, (Sat Oct 27, 7:08 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Fri Oct 26, 1:55 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Daniel Phillips, (Sat Oct 27, 6:58 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Mike Snitzer, (Sat Sep 8, 1:12 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Daniel Phillips, (Mon Sep 17, 8:28 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Mike Snitzer, (Mon Sep 17, 11:27 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Tue Sep 18, 5:30 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Daniel Phillips, (Tue Sep 18, 1:37 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Wed Sep 5, 7:42 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Wed Sep 5, 8:14 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Wed Sep 12, 6:52 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Wed Sep 12, 6:47 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Thu Sep 13, 4:19 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Thu Sep 13, 2:32 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Thu Sep 13, 3:24 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Wed Sep 5, 8:19 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Mon Sep 10, 3:29 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Tue Sep 11, 3:41 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Mon Sep 10, 3:37 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Mon Sep 10, 3:41 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Mon Sep 10, 3:55 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Mon Sep 10, 4:17 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Mon Sep 10, 4:48 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Wed Aug 15, 8:22 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Wed Aug 15, 9:12 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Wed Aug 15, 11:29 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Sun Aug 19, 11:51 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Mon Aug 20, 8:28 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Wed Sep 12, 6:39 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Tue Aug 21, 11:29 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Wed Aug 22, 11:02 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Mon Aug 20, 3:15 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Nick Piggin, (Mon Aug 20, 8:32 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Thu Aug 16, 4:27 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Wed Aug 15, 4:29 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Andi Kleen, (Wed Aug 15, 10:15 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Wed Aug 15, 9:55 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Wed Aug 15, 4:32 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Andi Kleen, (Wed Aug 15, 10:34 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Tue Aug 14, 10:36 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Tue Aug 14, 11:29 am)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Peter Zijlstra, (Tue Aug 14, 3:32 pm)
Re: [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC), Christoph Lameter, (Tue Aug 14, 3:41 pm)