Re: [PATCH 07/07] printk delay per multi lines

From: Dave Young
Date: Thu Feb 25 2010 - 20:09:56 EST


On Fri, Feb 26, 2010 at 12:17 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/