mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Young <hidave.darkstar@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jiri Kosina <jkosina@suse.cz>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Hans-Joachim Picht <hans@de.ibm.com>,
	Simon Kagstrom <simon.kagstrom@netinsight.net>,
	David Woodhouse <David.Woodhouse@intel.com>,
	James Morris <jmorris@namei.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 07/07] printk delay per multi lines
Date: Fri, 26 Feb 2010 09:09:47 +0800	[thread overview]
Message-ID: <a8e1da1002251709k3395592ct5587d49ce31d501c@mail.gmail.com> (raw)
In-Reply-To: <1267114634.22519.0.camel@laptop>

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

  reply	other threads:[~2010-02-26  1:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 15:45 Dave Young
2010-02-25 16:17 ` Peter Zijlstra
2010-02-26  1:09   ` Dave Young [this message]
2010-02-26  1:58   ` Dave Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8e1da1002251709k3395592ct5587d49ce31d501c@mail.gmail.com \
    --to=hidave.darkstar@gmail.com \
    --cc=David.Woodhouse@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@suse.de \
    --cc=hans@de.ibm.com \
    --cc=jkosina@suse.cz \
    --cc=jmorris@namei.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rdunlap@xenotime.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=simon.kagstrom@netinsight.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®