From: "Huang\, Ying" <ying.huang@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>,
David Hildenbrand <david@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
David Rientjes <rientjes@google.com>,
Michal Hocko <mhocko@kernel.org>,
Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan@kernel.org>,
Hugh Dickins <hughd@google.com>,
Rik van Riel <riel@surriel.com>
Subject: Re: [PATCH -V2] mm: Code cleanup for MADV_FREE
Date: Tue, 17 Mar 2020 16:10:30 +0800 [thread overview]
Message-ID: <87v9n3qu4p.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <b328ac30-6c4e-0dfb-c771-cb09c6346c75@suse.cz> (Vlastimil Babka's message of "Mon, 16 Mar 2020 18:17:23 +0100")
Vlastimil Babka <vbabka@suse.cz> writes:
> On 3/16/20 7:37 AM, 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-and-acked-by: David Rientjes <rientjes@google.com>
>> Acked-by: Michal Hocko <mhocko@kernel.org>
>> Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
>> 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: Vlastimil Babka <vbabka@suse.cz>
>
> Thanks! A grammar nit below:
>
>> --- a/include/linux/mm_inline.h
>> +++ b/include/linux/mm_inline.h
>> @@ -6,19 +6,20 @@
>> #include <linux/swap.h>
>>
>> /**
>> - * page_is_file_cache - should the page be on a file LRU or anon LRU?
>> + * page_is_file_lru - should the page be on a file LRU or anon LRU?
>> * @page: the page to test
>> *
>> - * Returns 1 if @page is page cache page backed by a regular filesystem,
>> - * or 0 if @page is anonymous, tmpfs or otherwise ram or swap backed.
>> - * Used by functions that manipulate the LRU lists, to sort a page
>> - * onto the right LRU list.
>> + * Returns 1 if @page is page cache page backed by a regular filesystem or
>> + * anonymous page lazily freed (e.g. via MADV_FREE). Returns 0 if @page is
>
> a lazily freed anonymous page (e.g. ...
Thought again. Should we make the 2 sub-clauses consistent? That is,
either
if @page is page cache page backed by a regular filesystem or anonymous
page freed lazily
or
if @page is a regular filesystem backed page cache page or a lazily
freed anonymous page
But I know that my English grammar isn't good enough :-(
Best Regards,
Huang, Ying
>> + * normal anonymous page, tmpfs or otherwise ram or swap backed. Used by
>> + * functions that manipulate the LRU lists, to sort a page onto the right LRU
>> + * list.
>> *
>> * We would like to get this info without a page flag, but the state
>> * needs to survive until the page is last deleted from the LRU, which
>> * could be as far down as __page_cache_release.
>> */
>> -static inline int page_is_file_cache(struct page *page)
>> +static inline int page_is_file_lru(struct page *page)
>> {
>> return !PageSwapBacked(page);
>> }
next prev parent reply other threads:[~2020-03-17 8:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 6:37 [PATCH -V2] mm: Code cleanup for MADV_FREE Huang, Ying
2020-03-16 16:17 ` Johannes Weiner
2020-03-16 17:17 ` Vlastimil Babka
2020-03-17 0:09 ` Huang, Ying
2020-03-17 8:10 ` Huang, Ying [this message]
2020-03-17 8:51 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9n3qu4p.fsf@yhuang-dev.intel.com \
--to=ying.huang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=pankaj.gupta.linux@gmail.com \
--cc=riel@surriel.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.