From: Yu Zhao <yuzhao@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Alexander Duyck" <alexander.h.duyck@linux.intel.com>,
"Huang Ying" <ying.huang@intel.com>,
"David Hildenbrand" <david@redhat.com>,
"Yang Shi" <yang.shi@linux.alibaba.com>, "Qian Cai" <cai@lca.pw>,
"Mel Gorman" <mgorman@suse.de>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
"Hugh Dickins" <hughd@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"Joonsoo Kim" <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v2 3/3] mm: remove superfluous __ClearPageWaiters()
Date: Thu, 20 Aug 2020 02:12:38 -0600 [thread overview]
Message-ID: <20200820081238.GA2576494@google.com> (raw)
In-Reply-To: <20200820061652.GX5422@dhcp22.suse.cz>
On Thu, Aug 20, 2020 at 08:18:27AM +0200, Michal Hocko wrote:
> On Tue 18-08-20 12:47:04, Yu Zhao wrote:
> > Presumably __ClearPageWaiters() was added to follow the previously
> > removed __ClearPageActive() pattern.
>
> I do not think so. Please have a look at 62906027091f ("mm: add
> PageWaiters indicating tasks are waiting for a page bit") and a
> discussion when the patch has been proposed. Sorry I do not have a link
> handy but I do remember that the handling was quite subtle.
>
> > Only flags that are in PAGE_FLAGS_CHECK_AT_FREE needs to be properly
> > cleared because otherwise we think there may be some kind of leak.
> > PG_waiters is not one of those flags and leaving the clearing to
> > PAGE_FLAGS_CHECK_AT_PREP is more appropriate.
>
> What is the point of this patch in the first place? Page waiters is
> quite subtle and I wouldn't touch it without having a very good reason.
I appreciate your caution. And I just studied the history [1] (I admit
this is something I should have done beforehand), and didn't find any
discussion on __ClearPageWaiters() specifically. So I would ask why it
was added originally. I was hoping Nicholas could help us.
[1] https://lore.kernel.org/lkml/20161225030030.23219-3-npiggin@gmail.com/
Given its triviality, I can't argue how useful this patch is. So I'll
go with how evident it is: we are removing __ClearPageWaiters() from
paths where pages have no references left -- they can't have any
waiters or be on any wait queues.
next prev parent reply other threads:[~2020-08-20 8:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 18:47 [PATCH v2 1/3] mm: remove activate_page() from unuse_pte() Yu Zhao
2020-08-18 18:47 ` [PATCH v2 2/3] mm: remove superfluous __ClearPageActive() Yu Zhao
2020-08-19 23:04 ` Yang Shi
2020-08-18 18:47 ` [PATCH v2 3/3] mm: remove superfluous __ClearPageWaiters() Yu Zhao
2020-08-19 23:06 ` Yang Shi
2020-08-19 23:39 ` Yu Zhao
2020-08-20 0:16 ` Yang Shi
2020-08-20 6:18 ` Michal Hocko
2020-08-20 8:12 ` Yu Zhao [this message]
2020-08-19 22:16 ` [PATCH v2 1/3] mm: remove activate_page() from unuse_pte() Yang Shi
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=20200820081238.GA2576494@google.com \
--to=yuzhao@google.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.h.duyck@linux.intel.com \
--cc=cai@lca.pw \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=npiggin@gmail.com \
--cc=yang.shi@linux.alibaba.com \
--cc=ying.huang@intel.com \
/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.