[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1267114634.22519.0.camel@laptop>
Date: Thu, 25 Feb 2010 17:17:14 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Dave Young <hidave.darkstar@...il.com>
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 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists