From: "Huang\, Ying" <ying.huang@intel.com>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>, Hugh Dickins <hughd@google.com>,
Minchan Kim <minchan@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Tim Chen <tim.c.chen@linux.intel.com>,
Mel Gorman <mgorman@techsingularity.net>,
Jérôme Glisse <jglisse@redhat.com>,
Michal Hocko <mhocko@suse.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Yang Shi <yang.shi@linux.alibaba.com>,
David Rientjes <rientjes@google.com>,
"Rik van Riel" <riel@redhat.com>, Jan Kara <jack@suse.cz>,
Dave Jiang <dave.jiang@intel.com>,
Daniel Jordan <daniel.m.jordan@oracle.com>,
"Andrea Parri" <andrea.parri@amarulasolutions.com>
Subject: Re: [PATCH -mm] mm, swap: Simplify total_swapcache_pages() with get_swap_device()
Date: Tue, 28 May 2019 08:46:02 +0800 [thread overview]
Message-ID: <871s0j8kz9.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20190527101536.GI28207@linux.ibm.com> (Paul E. McKenney's message of "Mon, 27 May 2019 03:15:36 -0700")
Hi, Paul,
"Paul E. McKenney" <paulmck@linux.ibm.com> writes:
> On Mon, May 27, 2019 at 04:27:14PM +0800, Huang, Ying wrote:
>> From: Huang Ying <ying.huang@intel.com>
>>
>> total_swapcache_pages() may race with swapper_spaces[] allocation and
>> freeing. Previously, this is protected with a swapper_spaces[]
>> specific RCU mechanism. To simplify the logic/code complexity, it is
>> replaced with get/put_swap_device(). The code line number is reduced
>> too. Although not so important, the swapoff() performance improves
>> too because one synchronize_rcu() call during swapoff() is deleted.
>
> I am guessing that total_swapcache_pages() is not used on any
> fastpaths, but must defer to others on this. Of course, if the
> performance/scalability of total_swapcache_pages() is important,
> benchmarking is needed.
This patch is mostly about code cleanup instead of performance. That
is, to make the code easier to be understand.
> But where do I find get_swap_device() and put_swap_device()? I do not
> see them in current mainline.
They are not in mainline, but in -mm tree. I should have made it more
clear. Sorry about that.
Best Regards,
Huang, Ying
prev parent reply other threads:[~2019-05-28 0:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 8:27 Huang, Ying
2019-05-27 10:15 ` Paul E. McKenney
2019-05-27 13:28 ` Andrea Parri
2019-05-28 0:46 ` Huang, Ying [this message]
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=871s0j8kz9.fsf@yhuang-dev.intel.com \
--to=ying.huang@intel.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andrea.parri@amarulasolutions.com \
--cc=daniel.m.jordan@oracle.com \
--cc=dave.jiang@intel.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=paulmck@linux.ibm.com \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=tim.c.chen@linux.intel.com \
--cc=yang.shi@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox