linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Pavel Machek <pavel@ucw.cz>,
	Alan Stern <stern@rowland.harvard.edu>,
	uclinux-dist-devel@blackfin.uclinux.org,
	linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [uclinux-dist-devel] [linux-pm] freezer: should barriers be smp ?
Date: Sat, 16 Apr 2011 01:30:55 +0200	[thread overview]
Message-ID: <201104160130.55836.rjw@sisk.pl> (raw)
In-Reply-To: <BANLkTik9aGTqb0JNr3RsnDjPiSpbSdEUpA@mail.gmail.com>

On Saturday, April 16, 2011, Mike Frysinger wrote:
> On Fri, Apr 15, 2011 at 19:11, Rafael J. Wysocki wrote:
> > On Friday, April 15, 2011, Mike Frysinger wrote:
> >> On Fri, Apr 15, 2011 at 12:29, Pavel Machek wrote:
> >> >> > > I believe the code is correct as is.
> >> >> >
> >> >> > that isnt what the code / documentation says.  unless i'm reading them
> >> >> > wrong, both seem to indicate that the proposed patch is what we
> >> >> > actually want.
> >> >>
> >> >> The existing code is correct but it isn't optimal.
> >> >>
> >> >> wmb() and rmb() are heavy-duty operations, and you don't want to call
> >> >> them when they aren't needed.  That's exactly what smp_wmb() and
> >> >> smp_rmb() are for -- they call wmb() and rmb(), but only in SMP
> >> >> kernels.
> >> >>
> >> >> Unless you need to synchronize with another processor (not necessarily
> >> >> a CPU, it could be something embedded within a device), you should
> >> >> always use smp_wmb() and smp_rmb() rather than wmb() and rmb().
> >> >
> >> > Maybe; but this code is not performance critical and I believe being
> >> > obvious here is better...
> >>
> >> isnt it though ?  especially when we talk about suspending/resuming on
> >> embedded systems to get more savings over just cpu idle ?  we want
> >> that latency to be as low as possible.
> >
> > I agree, we can switch the freezer to smp_ barriers, but not for the reason
> > you gave before. :-)
> >
> > Care to repost the patch with a suitable changelog?
> 
> np
> 
> to be clear, what you said wrt the Blackfin smp barriers still holds
> true right ?

I think so.

> so this changset i merged doesnt need any tweaking ...
> http://git.kernel.org/?p=linux/kernel/git/vapier/blackfin.git;a=commitdiff;h=943aee0c685d0563228d5a2ad9c8394ad0300fb5

Rafael

      reply	other threads:[~2011-04-15 23:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  6:14 freezer: should barriers be smp ? Mike Frysinger
2011-04-13 20:58 ` Rafael J. Wysocki
2011-04-13 21:02   ` Mike Frysinger
2011-04-13 21:05     ` Pavel Machek
2011-04-13 21:11       ` [uclinux-dist-devel] " Mike Frysinger
2011-04-13 21:53         ` Rafael J. Wysocki
2011-04-13 22:11           ` [linux-pm] " Alan Stern
2011-04-13 22:34             ` [linux-pm] [uclinux-dist-devel] freezer: should barriers be smp? Rafael J. Wysocki
2011-04-14 14:55               ` Alan Stern
2011-04-14 22:34                 ` Rafael J. Wysocki
2011-04-15 14:32                   ` Alan Stern
2011-04-13 22:22           ` [uclinux-dist-devel] freezer: should barriers be smp ? Mike Frysinger
2011-04-13 22:49             ` Rafael J. Wysocki
2011-04-13 22:53               ` Rafael J. Wysocki
2011-04-13 22:57               ` Mike Frysinger
2011-04-13 23:12                 ` Rafael J. Wysocki
2011-04-14 15:13                 ` [linux-pm] " Alan Stern
2011-04-14 22:40                   ` Rafael J. Wysocki
2011-04-13 22:04         ` [linux-pm] [uclinux-dist-devel] " Alan Stern
2011-04-15 16:29           ` Pavel Machek
2011-04-15 16:33             ` [uclinux-dist-devel] [linux-pm] " Mike Frysinger
2011-04-15 16:57               ` Pavel Machek
2011-04-15 23:11               ` Rafael J. Wysocki
2011-04-15 23:24                 ` Mike Frysinger
2011-04-15 23:30                   ` Rafael J. Wysocki [this message]

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=201104160130.55836.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=stern@rowland.harvard.edu \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.org \
    /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).