[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a8e1da1002251758w7f5c6745l88d55ef86f555ae1@mail.gmail.com>
Date: Fri, 26 Feb 2010 09:58:31 +0800
From: Dave Young <hidave.darkstar@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Randy Dunlap <rdunlap@...otime.net>, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Hans-Joachim Picht <hans@...ibm.com>,
Simon Kagstrom <simon.kagstrom@...insight.net>,
David Woodhouse <David.Woodhouse@...el.com>,
James Morris <jmorris@...ei.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Catalin Marinas <catalin.marinas@....com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH 07/07] printk delay per multi lines
On Fri, Feb 26, 2010 at 12:17 AM, Peter Zijlstra <peterz@...radead.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()
>
>> + smp_mb__before_atomic_dec();
>> + if (atomic_dec_return(&l))
>> + return;
>
> What's that barrier for?
>
>
Thanks for review.
Here is the fixed version, sorry for using attachment
--
Regards
dave
View attachment "07_printk_delay.patch" of type "text/x-patch" (8117 bytes)
Powered by blists - more mailing lists