LKML Archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Mel Gorman <mgorman@techsingularity.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Chris Mason <clm@fb.com>, Darren Hart <dvhart@linux.intel.com>,
	Hugh Dickins <hughd@google.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>,
	Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key
Date: Sat, 6 Feb 2016 09:22:14 +0100	[thread overview]
Message-ID: <20160206082214.GA29946@gmail.com> (raw)
In-Reply-To: <20160205180239.GB12375@linux-uzut.site>


* Davidlohr Bueso <dave@stgolabs.net> wrote:

> On Fri, 05 Feb 2016, Ingo Molnar wrote:
> 
> >So I too didn't understand that sentence at first, because the capitalization
> >really throws off quick parsing of that comment, as 'MB' ususally denotes
> >megabytes.
> 
> Sure, fair enough.
> 
> >
> >So please change it to "mb(); (A)" or so - and I think all of these comments
> >should be changed to use a standard API name for the barrier they imply, as the
> >head of futex.c does:
> >
> >*   waiters++; (a)
> >*   mb(); (A) <-- paired with -.
> >*                              |
> >*   lock(hash_bucket(futex));  |
> >*                              |
> >*   uval = *futex;             |
> >*                              |        *futex = newval;
> >*                              |        sys_futex(WAKE, futex);
> >*                              |          futex_wake(futex);
> >*                              |
> >*                              `------->  mb(); (B)
> >
> >Btw., pedantic: shouldn't that be smp_mb()? Futexes don't operate on IO spaces, so
> >on UP they only need compiler barriers.
> 
> Right, but we do in fact use smp barriers in this cases in the real code, that 
> mb() is just in the comments, I guess it would be desirable to change it to 
> smp_mb nonetheless.
> 
> However, could these changes be in a followup? Mainly because the barrier B 
> references will be updated across all futex.c... unless there are still concerns 
> about this particular patch, of course.

How about doing it first in a preparatory patch? So that reviews of patches 
actually making substantial changes don't get derailed by hard to read comments 
and so.

Thanks,

	Ingo

      reply	other threads:[~2016-02-06  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04  6:28 [PATCH v5] futex: Remove requirement for lock_page in get_futex_key Davidlohr Bueso
2016-02-04  9:06 ` Thomas Gleixner
2016-02-04 17:43   ` Davidlohr Bueso
2016-02-04 17:50     ` Thomas Gleixner
2016-02-05  9:44       ` Ingo Molnar
2016-02-05 18:02         ` Davidlohr Bueso
2016-02-06  8:22           ` Ingo Molnar [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=20160206082214.GA29946@gmail.com \
    --to=mingo@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=clm@fb.com \
    --cc=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=dvhart@linux.intel.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mgorman@techsingularity.net \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.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 read-only IMAP folder(s) and NNTP newsgroup(s).