lkml.org 
[lkml]   [2010]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 07/07] printk delay per multi lines
From
On Fri, Feb 26, 2010 at 12:17 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, 2010-02-25 at 23:45 +0800, Dave Young wrote:
>> +               if (!atomic_read(&l))
>> +                       atomic_set(&l, printk_delay_lines);
>
> That's racy, use atomic_cmpxchg()

Will fix, thanks

>
>> +               smp_mb__before_atomic_dec();
>> +               if (atomic_dec_return(&l))
>> +                       return;
>
> What's that barrier for?

Will fix, no memory operation here

--
Regards
dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-02-26 02:13    [W:0.059 / U:0.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site