lkml.org 
[lkml]   [2011]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 2/5] mm: Switch mod_state() to __this_cpu_read()
On Mon, 19 Sep 2011, Steven Rostedt wrote:

> From: Steven Rostedt <srostedt@redhat.com>
>
> The code in mod_state() is already made to handle the raciness of
> this_cpu_read(). Have the code use __this_cpu_read() instead so
> the debug code does not trigger warnings about it.

Why would there be a warning triggered? this_cpu_read should take care of
disabling preemption for the read if needed. In fact the fallback case
does do exactly that.

I think it would make more sence if __this_cpu_read() could be made to
trigger a warning if used in context where preemption could be off.



\
 
 \ /
  Last update: 2011-09-20 00:05    [W:0.165 / U:3.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site