Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-29 Thread Nick Piggin
On Monday 24 September 2007 18:45, Peter Zijlstra wrote: > Just an idea I had, it seems like a good idea to wait for RCU callbacks > in reclaim so that we won't get all of memory stuck there. I think it would be much too aggressive (_especially_ with preemptible RCU, I would have thought?). And no

Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-24 Thread Peter Zijlstra
On Mon, 24 Sep 2007 18:18:30 +0530 Balbir Singh <[EMAIL PROTECTED]> wrote: > Peter Zijlstra wrote: > >>> Only kswapd can do this, direct reclaim has deadlock potential. > >> Yes, but not in all cases, do you want to add any gfp_mask > >> based smartness for direct reclaim? > > > > gfp_mask doesn'

Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-24 Thread Balbir Singh
Peter Zijlstra wrote: >>> Only kswapd can do this, direct reclaim has deadlock potential. >> Yes, but not in all cases, do you want to add any gfp_mask >> based smartness for direct reclaim? > > gfp_mask doesn't carry the needed information. It depends on whether > the current context holds a rcu_

Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-24 Thread Peter Zijlstra
On Mon, 24 Sep 2007 16:52:15 +0530 Balbir Singh <[EMAIL PROTECTED]> wrote: > Peter Zijlstra wrote: > > On Mon, 24 Sep 2007 16:12:19 +0530 Balbir Singh > > <[EMAIL PROTECTED]> wrote: > > > >> Peter Zijlstra wrote: > >>> Just an idea I had, it seems like a good idea to wait for RCU callbacks > >>>

Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-24 Thread Balbir Singh
Peter Zijlstra wrote: > On Mon, 24 Sep 2007 16:12:19 +0530 Balbir Singh > <[EMAIL PROTECTED]> wrote: > >> Peter Zijlstra wrote: >>> Just an idea I had, it seems like a good idea to wait for RCU callbacks >>> in reclaim so that we won't get all of memory stuck there. >>> >>> If this location is too

Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-24 Thread Peter Zijlstra
On Mon, 24 Sep 2007 16:12:19 +0530 Balbir Singh <[EMAIL PROTECTED]> wrote: > Peter Zijlstra wrote: > > > > Just an idea I had, it seems like a good idea to wait for RCU callbacks > > in reclaim so that we won't get all of memory stuck there. > > > > If this location is too aggressive we might st

Re: [RFC][PATCH] mm: couple rcu and memory reclaim

2007-09-24 Thread Balbir Singh
Peter Zijlstra wrote: > > Just an idea I had, it seems like a good idea to wait for RCU callbacks > in reclaim so that we won't get all of memory stuck there. > > If this location is too aggressive we might stick it next to > disable_swap_token(). > > --- > Couple RCU and reclaim. > > There cou