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: <20080624092824.4f0440ca@bree.surriel.com>
Date:	Tue, 24 Jun 2008 09:28:24 -0400
From:	Rik van Riel <riel@...hat.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	linux-mm <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
	Lee Schermerhorn <Lee.Schermerhorn@...com>,
	kosaki.motohiro@...fujitsu.com, akpm@...ux-foundation.org
Subject: Re: [RFC][PATCH] prevent incorrect oom under split_lru

On Tue, 24 Jun 2008 17:31:54 +0900
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> wrote:

> if zone->recent_scanned parameter become inbalanceing anon and file,
> OOM killer can happened although swappable page exist.
> 
> So, if priority==0, We should try to reclaim all page for prevent OOM.

You are absolutely right.  Good catch.

> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>

Acked-by: Rik van Riel <riel@...hat.com>

> ---
>  mm/vmscan.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> Index: b/mm/vmscan.c
> ===================================================================
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1464,8 +1464,10 @@ static unsigned long shrink_zone(int pri
>  			 * kernel will slowly sift through each list.
>  			 */
>  			scan = zone_page_state(zone, NR_LRU_BASE + l);
> -			scan >>= priority;
> -			scan = (scan * percent[file]) / 100;
> +			if (priority) {
> +				scan >>= priority;
> +				scan = (scan * percent[file]) / 100;
> +			}
>  			zone->lru[l].nr_scan += scan + 1;
>  			nr[l] = zone->lru[l].nr_scan;
>  			if (nr[l] >= sc->swap_cluster_max)
> 


-- 
All rights reversed.
--
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