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]
Date:   Sun, 5 Feb 2017 11:11:14 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Mel Gorman <mgorman@...e.de>
Cc:     'Andrew Morton' <akpm@...ux-foundation.org>,
        Hillf Danton <hillf.zj@...baba-inc.com>,
        'Johannes Weiner' <hannes@...xchg.org>,
        'Minchan Kim' <minchan.kim@...il.com>,
        'Rik van Riel' <riel@...hat.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced

On Fri 03-02-17 20:32:22, Mel Gorman wrote:
> Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan:
> make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer
> cleared. It was not noticed as triggering it requires pages under writeback
> to cycle twice through the LRU and before kswapd gets stalled. Historically,
> such issues tended to occur on small machines writing heavily to slow
> storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may
> be higher but due to the fact that memory pressure is requires, it would not
> be very noticable. Michal Hocko suggested removing the flag entirely but
> the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour
> and clear the flag when a suitable zone is balanced.
> 
> Signed-off-by: Mel Gorman <mgorman@...e.de>

I agree this is a more conservative approach but I think removing
PGDAT_WRITEBACK should simplify things a bit.

Acked-by: Michal Hocko <mhocko@...e.com>

> ---
>  mm/vmscan.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 532a2a750952..3379fa5ce6d8 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -3103,6 +3103,7 @@ static bool zone_balanced(struct zone *zone, int order, int classzone_idx)
>  	 */
>  	clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags);
>  	clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags);
> +	clear_bit(PGDAT_WRITEBACK, &zone->zone_pgdat->flags);
>  
>  	return true;
>  }
> 
> -- 
> Mel Gorman
> SUSE Labs

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ