lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46F7948B.7000802@linux.vnet.ibm.com>
Date:	Mon, 24 Sep 2007 16:12:19 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Rik van Riel <riel@...hat.com>
Subject: Re: [RFC][PATCH] mm: couple rcu and memory reclaim

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 could be a lot of memory stuck in RCU callbacks. Wait for RCU to
> finish before giving it another go.
> 
> Placed in kswapd and not direct reclaim path because kswapd never holds
> rcu_read_lock() at this point and can thus not deadlock. Direct reclaim
> callers might hold rcu_read_lock() and would suffer from deadlocks if
> sync_rcu() were to be called.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
>  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
> @@ -1435,8 +1435,10 @@ loop_again:
>  		unsigned long lru_pages = 0;
> 
>  		/* The swap token gets in the way of swapout... */
> -		if (!priority)
> +		if (!priority) {
> +			synchronize_rcu();

Interesting change

1. I suspect that synchronize_rcu() is most likely to free up
   slab pages, so shrink_slab() will clean up all the freed
   pages. Could we add a comment to indicate the same?
2. Shouldn't we do this in balance_pgdat() as well?


>  			disable_swap_token();
> +		}
> 
>  		all_zones_ok = 1;
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ