From: Helge Deller <deller@gmx.de>
To: John David Anglin <dave.anglin@bell.net>,
Carlos O'Donell <carlos@systemhalted.org>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
Mike Frysinger <vapier@gentoo.org>,
linux-parisc <linux-parisc@vger.kernel.org>
Subject: Re: parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address
Date: Sat, 21 Feb 2015 22:04:10 +0100 [thread overview]
Message-ID: <54E8F2CA.6060904@gmx.de> (raw)
In-Reply-To: <BLU436-SMTP15952414B35EC498F0793B1972B0@phx.gbl>
On 21.02.2015 21:31, John David Anglin wrote:
> On 2015-02-20, at 4:36 PM, Carlos O'Donell wrote:
>
>> On Thu, Apr 3, 2014 at 4:26 PM, Helge Deller <deller@gmx.de> wrote:
>>> In current eglibc it's set to 0x00400000
>>> That's what my eglibc-patch changes...
>>> I'm currently building a eglibc on hpviz with SHMLBA set to 4096 (__getpagesize()).
>>
>> Anyone object to me fixing this upstream by making SHMLBA match the kernel?
I think to remember that that would be best.
Didn't I pushed this (SHMLBA=4k) to eglibc?
>> I plan to use a fixed value of 4096, since I never expect hppa
>> userspace to have to care (even if the kernel uses superpages).
Yes.
> We currently use (__getpagesize ()) in Debian and this seems to be a common definition.
> Is there a performance advantage in using 4096?
Yes, we have:
Index: eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h
===================================================================
--- eglibc-2.18.orig/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h 2013-01-09 19:28:48.000000000 -0500
+++ eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h 2014-04-09 21:08:06.516202583 -0400
@@ -36,7 +36,7 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
/* Segment low boundary address multiple. */
-#define SHMLBA 0x00400000 /* address needs to be 4 Mb aligned */
+#define SHMLBA (__getpagesize ())
I prefer this for glibc as well.
> At one time, we thought this value needed to be 4 MB. Helge was working on improving the mmap
> allocation scheme but this work stalled after some improvement.
They are just on hold, but not that needed any more after we have the flexmap implementation.
> I can't remember the issues and how they relate to SHMLBA.
I would need to recall too. IIRC, SHMLBA and the 4MB cache alignments do not really relate to each
other. Userspace should just mmap(X) where X is aligned to SHMLBA. The mmap will then
mmap to the next possible address (starting somewhere above/equal to X) and still fulfilling the 4MB cache
alignment (if it's a shared mmap).
Helge
next prev parent reply other threads:[~2015-02-21 21:04 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 19:17 parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address Aaro Koskinen
2013-12-19 19:44 ` John David Anglin
2013-12-19 20:28 ` Aaro Koskinen
2013-12-19 21:19 ` Mike Frysinger
2013-12-19 22:38 ` John David Anglin
2013-12-19 23:02 ` Mike Frysinger
2013-12-20 22:10 ` Helge Deller
2013-12-23 20:26 ` Aaro Koskinen
2013-12-29 20:50 ` Helge Deller
2013-12-29 21:26 ` Aaro Koskinen
2013-12-21 18:18 ` John David Anglin
2014-03-02 21:22 ` Helge Deller
2014-04-01 18:26 ` Aaro Koskinen
2014-04-01 18:49 ` Helge Deller
2014-04-02 19:09 ` Carlos O'Donell
2014-04-02 21:09 ` Helge Deller
2014-04-02 21:41 ` John David Anglin
2014-04-03 19:41 ` Helge Deller
2014-04-03 20:03 ` John David Anglin
2014-04-03 20:26 ` Helge Deller
2015-02-20 21:36 ` Carlos O'Donell
2015-02-21 20:31 ` John David Anglin
2015-02-21 20:40 ` John David Anglin
2015-02-21 23:09 ` James Bottomley
2015-02-21 23:26 ` Helge Deller
2015-02-21 23:57 ` James Bottomley
2015-02-22 16:45 ` John David Anglin
2015-02-22 17:17 ` James Bottomley
2015-02-22 17:53 ` Helge Deller
2015-02-22 17:54 ` John David Anglin
2015-02-22 17:58 ` James Bottomley
2015-02-22 18:07 ` Helge Deller
2015-02-22 19:13 ` James Bottomley
2015-02-22 19:16 ` Helge Deller
2015-02-22 19:42 ` James Bottomley
2015-03-07 19:05 ` Carlos O'Donell
2015-02-22 18:28 ` parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address - optimized patches Helge Deller
2015-02-22 17:28 ` parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address James Bottomley
2015-02-22 18:02 ` John David Anglin
2015-02-21 21:04 ` Helge Deller [this message]
2014-04-03 20:12 ` John David Anglin
2014-04-03 20:27 ` Helge Deller
2014-04-04 15:45 ` Jeroen Roovers
2013-12-19 20:28 ` Helge Deller
2013-12-19 20:53 ` Aaro Koskinen
2013-12-23 20:34 ` Rolf Eike Beer
2013-12-24 2:39 ` John David Anglin
2013-12-24 9:32 ` Rolf Eike Beer
2014-01-27 11:23 ` Rolf Eike Beer
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=54E8F2CA.6060904@gmx.de \
--to=deller@gmx.de \
--cc=aaro.koskinen@iki.fi \
--cc=carlos@systemhalted.org \
--cc=dave.anglin@bell.net \
--cc=linux-parisc@vger.kernel.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