Messages in this thread | | | From | "Huang\, Ying" <> | Subject | Re: [PATCH] mm: Code cleanup for MADV_FREE | Date | Mon, 16 Mar 2020 09:42:06 +0800 |
| |
Michal Hocko <mhocko@kernel.org> writes:
> On Fri 13-03-20 17:00:56, Huang, Ying wrote: >> From: Huang Ying <ying.huang@intel.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@intel.com> >> Suggested-by: David Hildenbrand <david@redhat.com> >> Suggested-by: Johannes Weiner <hannes@cmpxchg.org> >> Suggested-by: David Rientjes <rientjes@google.com> >> Cc: Michal Hocko <mhocko@kernel.org> >> Cc: Dave Hansen <dave.hansen@linux.intel.com> >> Cc: Mel Gorman <mgorman@suse.de> >> Cc: Vlastimil Babka <vbabka@suse.cz> >> Cc: Minchan Kim <minchan@kernel.org> >> Cc: Hugh Dickins <hughd@google.com> >> Cc: Rik van Riel <riel@surriel.com> > > Acked-by: Michal Hocko <mhocko@suse.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).
This looks better, Thanks! I will send a new version with this.
Best Regards, Huang, Ying
| |