lkml.org 
[lkml]   [2011]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/5] writeback: fix dirtied pages accounting on sub-page writes
From
Date
On Tue, 2011-11-22 at 13:21 +0100, Jan Kara wrote:
> > + __get_cpu_var(bdp_ratelimits)++;
> I think you need preempt_disable() and preempt_enable() pair around
> __get_cpu_var(). Otherwise a process could get rescheduled in the middle of
> read-modify-write cycle...

there's of course the this_cpu_inc(bdp_ratelimits); thing.

On x86 that'll turn into a single insn, on others it will add the
required preempt_disable/enable bits.


\
 
 \ /
  Last update: 2011-11-22 14:01    [from the cache]
©2003-2011 Jasper Spaans