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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Mar 2020 16:41:10 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, David Hildenbrand <david@...hat.com>,
        Johannes Weiner <hannes@...xchg.org>,
        David Rientjes <rientjes@...gle.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Mel Gorman <mgorman@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
        Minchan Kim <minchan@...nel.org>,
        Hugh Dickins <hughd@...gle.com>,
        Rik van Riel <riel@...riel.com>
Subject: Re: [PATCH] mm: Code cleanup for MADV_FREE

On Fri 13-03-20 17:00:56, Huang, Ying wrote:
> From: Huang Ying <ying.huang@...el.com>
> 
> Some comments for MADV_FREE is revised and added to help people understand the
> MADV_FREE code, especially the page flag, PG_swapbacked.  This makes
> page_is_file_cache() isn't consistent with its comments.  So the function is
> renamed to page_is_file_lru() to make them consistent again.  All these are put
> in one patch as one logical change.
> 
> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
> Suggested-by: David Hildenbrand <david@...hat.com>
> Suggested-by: Johannes Weiner <hannes@...xchg.org>
> Suggested-by: David Rientjes <rientjes@...gle.com>
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Minchan Kim <minchan@...nel.org>
> Cc: Hugh Dickins <hughd@...gle.com>
> Cc: Rik van Riel <riel@...riel.com>

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

Although I would rephrased this a bit
> + * PG_swapbacked is cleared if the page is page cache page backed by a regular
> + * file system or anonymous page lazily freed (e.g. via MADV_FREE).  It is set
> + * if the page is normal anonymous page, tmpfs or otherwise RAM or swap backed.
> + *

PG_swapbacked is set when a page uses swap as a backing storage. This
are usually PageAnon or shmem pages but please note that even anonymous
pages might lose their PG_swapbacked flag when they simply can be
dropped (e.g. as a result of MADV_FREE).
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ