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: <20121213160742.GH21644@dhcp22.suse.cz>
Date:	Thu, 13 Dec 2012 17:07:42 +0100
From:	Michal Hocko <mhocko@...e.cz>
To:	Johannes Weiner <hannes@...xchg.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>, Mel Gorman <mgorman@...e.de>,
	Hugh Dickins <hughd@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 5/8] mm: vmscan: improve comment on low-page cache
 handling

On Wed 12-12-12 16:43:37, Johannes Weiner wrote:
> Fix comment style and elaborate on why anonymous memory is
> force-scanned when file cache runs low.
> 
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>

yes, much better
Reviewed-by: Michal Hocko <mhocko@...e.cz>

> ---
>  mm/vmscan.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 5e1beed..05475e1 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1697,13 +1697,15 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
>  	file  = get_lru_size(lruvec, LRU_ACTIVE_FILE) +
>  		get_lru_size(lruvec, LRU_INACTIVE_FILE);
>  
> +	/*
> +	 * If it's foreseeable that reclaiming the file cache won't be
> +	 * enough to get the zone back into a desirable shape, we have
> +	 * to swap.  Better start now and leave the - probably heavily
> +	 * thrashing - remaining file pages alone.
> +	 */
>  	if (global_reclaim(sc)) {
> -		free  = zone_page_state(zone, NR_FREE_PAGES);
> +		free = zone_page_state(zone, NR_FREE_PAGES);
>  		if (unlikely(file + free <= high_wmark_pages(zone))) {
> -			/*
> -			 * If we have very few page cache pages, force-scan
> -			 * anon pages.
> -			 */
>  			fraction[0] = 1;
>  			fraction[1] = 0;
>  			denominator = 1;
> -- 
> 1.7.11.7
> 

-- 
Michal Hocko
SUSE Labs
--
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