mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Ingo Molnar <mingo@elte.hu>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Andy Whitcroft <apw@shadowen.org>
Subject: Re: [PATCH 1/2] kthread: add a missing memory barrier to kthread_stop()
Date: Mon, 3 Mar 2008 08:50:56 +1100	[thread overview]
Message-ID: <200803030850.57615.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1203543390.6307.24.camel@earth>

On Thursday 21 February 2008 08:36:30 Dmitry Adamushko wrote:
> From: Dmitry Adamushko <dmitry.adamushko@gmail.com>
> Subject: kthread: add a missing memory barrier to kthread_stop()
>
> We must ensure that kthread_stop_info.k has been updated before
> kthread's wakeup. This is required to properly support
> the use of kthread_should_stop() in the main loop of kthread.
>
> wake_up_process() doesn't imply a full memory barrier,
> so we add an explicit one.

I always believed that wake_up_process() implies a write barrier.  It's pretty 
common to set something up then wake the intended recipient.

So I think this patch is overkill, but I'm happy to be corrected.

Thanks!
Rusty.

  reply	other threads:[~2008-03-02 21:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 21:36 Dmitry Adamushko
2008-03-02 21:50 ` Rusty Russell [this message]
2008-03-02 22:28   ` Dmitry Adamushko

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=200803030850.57615.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=dmitry.adamushko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=paulmck@linux.vnet.ibm.com \
    /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®