From: Hekuang <hekuang@huawei.com>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: <akpm@linux-foundation.org>, <mhocko@suse.com>, <vbabka@suse.cz>,
<rientjes@google.com>, <cody@linux.vnet.ibm.com>,
<gilad@benyossef.com>, <kosaki.motohiro@gmail.com>,
<mgorman@suse.de>, <penberg@kernel.org>, <lizefan@huawei.com>,
<wangnan0@huawei.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"
Date: Wed, 30 Mar 2016 18:51:12 +0800 [thread overview]
Message-ID: <56FBAFA0.3010604@huawei.com> (raw)
In-Reply-To: <20160330103839.GA4773@techsingularity.net>
hi
在 2016/3/30 18:38, Mel Gorman 写道:
> On Wed, Mar 30, 2016 at 10:22:07AM +0000, He Kuang wrote:
>> This reverts commit 998d39cb236fe464af86a3492a24d2f67ee1efc2.
>>
>> When local irq is disabled, a percpu variable does not change, so we can
>> remove the access macros and let the compiler optimize the code safely.
>>
> batch can be changed from other contexts. Why is this safe?
>
I've mistakenly thought that per_cpu variable can only be accessed by
that cpu.
Thanks.
next prev parent reply other threads:[~2016-03-30 10:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 10:22 [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE" He Kuang
2016-03-30 10:38 ` Mel Gorman
2016-03-30 10:51 ` Hekuang [this message]
2016-03-30 11:10 ` Michal Hocko
2016-03-31 1:14 ` Hekuang
2016-03-31 1:39 ` Zefan Li
2016-03-31 1:47 ` Hekuang
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=56FBAFA0.3010604@huawei.com \
--to=hekuang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=cody@linux.vnet.ibm.com \
--cc=gilad@benyossef.com \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=mgorman@suse.de \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=wangnan0@huawei.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