From: Andrew Morton <akpm@linux-foundation.org>
To: Rich Felker <dalias@libc.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Davidlohr Bueso <dave@stgolabs.net>,
Ingo Molnar <mingo@kernel.org>,
Darren Hart <dvhart@linux.intel.com>,
Mel Gorman <mgorman@suse.de>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Greg Ungerer <gerg@uclinux.org>, Steven Miao <realmz6@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: Re: [PATCH] futex: fix shared futex operations on nommu
Date: Tue, 26 Apr 2016 15:27:10 -0700 [thread overview]
Message-ID: <20160426152710.e9f94f6938ff2fc13021f3ef@linux-foundation.org> (raw)
In-Reply-To: <20160426162739.GN21636@brightrain.aerifal.cx>
On Tue, 26 Apr 2016 12:27:39 -0400 Rich Felker <dalias@libc.org> wrote:
> On Tue, Apr 26, 2016 at 06:11:07PM +0200, Sebastian Andrzej Siewior wrote:
> > * Rich Felker | 2016-04-26 11:53:44 [-0400]:
> >
> > >The whole shared futex logic is meaningless for nommu. Perhaps I
> > >should have written a better message, though.
> > >
> > >With MMU, shared futex keys need to identify the physical backing for
> > >a memory address because it may be mapped at different addresses in
> > >different processes (or even multiple times in the same process).
> > >Without MMU this cannot happen. You only have physical addresses. So
> > >the "private futex" behavior of using the virtual address as the key
> > >is always correct (for both shared and private cases) on nommu
> > >systems.
> >
> > So using a shared futex on NOMMU does work but it would be more
> > efficient to always use a private futex instead.
> > Is this what you are saying?
>
> No. What I'm saying is that the current code paths for shared futex
> are mmu-specific. They neither work (due to different mm internals, I
> think) nor make sense (due to lack of virtual addresses that map to
> the same physical address) on nommu.
>
> The private futex code paths are correct for either private or shared
> futexes on nommu. This is both the natural theoretical prediction, and
> confirmed by testing the patch.
It is apparent from Sebastian's questioning that a code comment will be
needed, please.
Also, what specifically is the runtime effect of the patch? Does the
futex code presently misbehave on NOMMU when FUTEX_PRIVATE_FLAG is
unset?
next prev parent reply other threads:[~2016-04-26 22:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 1:03 Rich Felker
2016-04-26 9:55 ` Sebastian Andrzej Siewior
2016-04-26 15:53 ` Rich Felker
2016-04-26 16:11 ` Sebastian Andrzej Siewior
2016-04-26 16:27 ` Rich Felker
2016-04-26 22:27 ` Andrew Morton [this message]
2016-04-26 22:31 ` Rich Felker
2016-04-27 13:43 ` Thomas Gleixner
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=20160426152710.e9f94f6938ff2fc13021f3ef@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=dalias@libc.org \
--cc=dave@stgolabs.net \
--cc=dvhart@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=gerg@uclinux.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=realmz6@gmail.com \
--cc=tglx@linutronix.de \
--cc=ysato@users.sourceforge.jp \
/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®