lkml.org 
[lkml]   [2016]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"
From
Date
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.

\
 
 \ /
  Last update: 2016-03-30 13:01    [W:0.048 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site