linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Nigel Cunningham <nigel@nigel.suspend2.net>,
	Uli Luckas <u.luckas@road.de>, Oleg Nesterov <oleg@tv-sign.ru>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm] PM: Prevent frozen user mode helpers from failing the freezing of tasks (rev. 2)
Date: Tue, 03 Jul 2007 15:30:46 +1000	[thread overview]
Message-ID: <1183440646.10386.66.camel@localhost.localdomain> (raw)
In-Reply-To: <200706260027.02396.rjw@sisk.pl>

On Tue, 2007-06-26 at 00:27 +0200, Rafael J. Wysocki wrote:
> > >     case PM_HIBERNATION_PREPARE:
> > >     case PM_SUSPEND_PREPARE:
> > >             usermodehelper_disabled = 1;
> > > -           return NOTIFY_OK;
> > > +           smp_mb();
> > 
> > usermodehelper_disabled should be atomic variable, too, so we don't
> > have to play these ugly tricks by hand? This should not be
> > performance-critical, right?
> 
> Well, I think we'd need to add the barriers anyway.
> 
> The problem, as far as I understand it, is that the instructions can
> get
> reordered if there are no barriers in there.

That seems dodgy either way to me :-)

Just use a spinlock.

Ben.


  parent reply	other threads:[~2007-07-03  5:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25 21:52 [PATCH -mm] PM: Prevent frozen user mode helpers from failing the freezing of tasks (rev. 2) Rafael J. Wysocki
2007-06-25 21:50 ` Nigel Cunningham
2007-06-25 21:55 ` Pavel Machek
2007-06-25 22:27   ` Rafael J. Wysocki
2007-06-26  8:48     ` Pavel Machek
2007-07-03  5:31       ` Benjamin Herrenschmidt
2007-06-26 12:02     ` Oleg Nesterov
2007-07-03  5:30     ` Benjamin Herrenschmidt [this message]
2007-07-03 13:19       ` Rafael J. Wysocki
2007-07-03 13:36         ` Rafael J. Wysocki
2007-07-03 17:45       ` Oleg Nesterov
2007-07-03 21:19         ` Benjamin Herrenschmidt
2007-06-26  8:07 ` Uli Luckas

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=1183440646.10386.66.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=oleg@tv-sign.ru \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=u.luckas@road.de \
    /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;
as well as URLs for NNTP newsgroup(s).