From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751954AbcC3Kis (ORCPT ); Wed, 30 Mar 2016 06:38:48 -0400 Received: from outbound-smtp03.blacknight.com ([81.17.249.16]:37255 "EHLO outbound-smtp03.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282AbcC3Kir (ORCPT ); Wed, 30 Mar 2016 06:38:47 -0400 Date: Wed, 30 Mar 2016 11:38:39 +0100 From: Mel Gorman To: He Kuang 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" Message-ID: <20160330103839.GA4773@techsingularity.net> References: <1459333327-89720-1-git-send-email-hekuang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1459333327-89720-1-git-send-email-hekuang@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Mel Gorman SUSE Labs