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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <balbir@...>
Cc: Paul E. McKenney <paulmck@...>, <linux-kernel@...>, Nick Piggin <nickpiggin@...>, Rik van Riel <riel@...>
Date: Monday, September 24, 2007 - 7:50 am

On Mon, 24 Sep 2007 16:52:15 +0530 Balbir Singh
<balbir@linux.vnet.ibm.com> wrote:


---
 mm/vmscan.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/mm/vmscan.c
===================================================================
--- linux-2.6.orig/mm/vmscan.c
+++ linux-2.6/mm/vmscan.c
@@ -1527,8 +1527,10 @@ loop_again:
 		 * OK, kswapd is getting into trouble.  Take a nap, then take
 		 * another pass across the zones.
 		 */
-		if (total_scanned && priority < DEF_PRIORITY - 2)
+		if (total_scanned && priority < DEF_PRIORITY - 2) {
+			synchronize_rcu();
 			congestion_wait(WRITE, HZ/10);
+		}
 
 		/*
 		 * We do this so kswapd doesn't build up large priorities for


gfp_mask doesn't carry the needed information. It depends on whether
the current context holds a rcu_read_lock().

so something like:

   rcu_read_lock()
   foo = kmalloc(sizeof(foo))
      new_slab()
        __alloc_pages()
          try_to_free_pages()
            synchronise_rcu() <-- deadlock
   rcu_read_unlock()
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH] mm: couple rcu and memory reclaim, Peter Zijlstra, (Mon Sep 24, 4:45 am)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Nick Piggin, (Fri Sep 28, 4:13 pm)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Balbir Singh, (Mon Sep 24, 6:42 am)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Peter Zijlstra, (Mon Sep 24, 7:06 am)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Balbir Singh, (Mon Sep 24, 7:22 am)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Peter Zijlstra, (Mon Sep 24, 7:50 am)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Balbir Singh, (Mon Sep 24, 8:48 am)
Re: [RFC][PATCH] mm: couple rcu and memory reclaim, Peter Zijlstra, (Mon Sep 24, 8:58 am)