From: Ben Hutchings <ben@decadent.org.uk>
To: Helge Deller <deller@gmx.de>, linux-parisc@vger.kernel.org
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
John David Anglin <dave.anglin@bell.net>,
stable@vger.kernel.org
Subject: Re: [PATCH 3/9] parisc: Fix asm/mman.h regarding MAP_HUGETLB and MADV_XX flags
Date: Sat, 21 Nov 2015 20:57:07 +0000 [thread overview]
Message-ID: <1448139427.17638.16.camel@decadent.org.uk> (raw)
In-Reply-To: <1448055522-11594-4-git-send-email-deller@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 4303 bytes --]
On Fri, 2015-11-20 at 22:38 +0100, Helge Deller wrote:
> On parisc we have up to now never supported Huge Pages, even glibc did
> not defined MAP_HUGETLB for parisc. Since the Huge Page support is being
> added now, clean up existing definitions for MAP_HUGETLB and friends.
>
> Drop lots of MADV_xxK_PAGES flags, which were never used and were
> designed for a patch which was never integrated into the Linux
> kernel. Instead move other MADV_ flags to make them more compatible to
> other linux architectures.
Changing the unimplemented values seems fine, but how can it be OK to
renumber MAP_GROWSUP, MADV_DONTDUMP and MADV_DODUMP?
Ben.
> Cc: stable@vger.kernel.org
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> arch/parisc/include/uapi/asm/mman.h | 29 ++++++++++-------------------
> 1 file changed, 10 insertions(+), 19 deletions(-)
>
> diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h
> index 294d251..9ac77f1 100644
> --- a/arch/parisc/include/uapi/asm/mman.h
> +++ b/arch/parisc/include/uapi/asm/mman.h
> @@ -19,11 +19,12 @@
> #define MAP_EXECUTABLE> > 0x1000> > > /* mark it as an executable */
> #define MAP_LOCKED> > 0x2000> > > /* pages are locked */
> #define MAP_NORESERVE> > 0x4000> > > /* don't check for reservations */
> -#define MAP_GROWSDOWN> > 0x8000> > > /* stack-like segment */
> +#define MAP_GROWSDOWN> > 0x8000> > > /* x86 stack-like segment */
> #define MAP_POPULATE> > 0x10000> > > /* populate (prefault) pagetables */
> #define MAP_NONBLOCK> > 0x20000> > > /* do not block on IO */
> -#define MAP_STACK> > 0x40000> > > /* give out an address that is best suited for process/thread stacks */
> -#define MAP_HUGETLB> > 0x80000> > > /* create a huge page mapping */
> +#define MAP_HUGETLB> > 0x40000> > > /* create a huge page mapping */
> +#define MAP_GROWSUP> > 0x80000> > > /* parisc stack-like segment */
> +#define MAP_STACK> > MAP_GROWSUP> > /* give out an address that is best suited for process/thread stacks */
>
> #define MS_SYNC> > > 1> > > /* synchronous memory sync */
> #define MS_ASYNC> > 2> > > /* sync memory asynchronously */
> @@ -46,25 +47,15 @@
> #define MADV_DONTFORK> > 10> > > /* don't inherit across fork */
> #define MADV_DOFORK> > 11> > > /* do inherit across fork */
>
> -/* The range 12-64 is reserved for page size specification. */
> -#define MADV_4K_PAGES 12 /* Use 4K pages */
> -#define MADV_16K_PAGES 14 /* Use 16K pages */
> -#define MADV_64K_PAGES 16 /* Use 64K pages */
> -#define MADV_256K_PAGES 18 /* Use 256K pages */
> -#define MADV_1M_PAGES 20 /* Use 1 Megabyte pages */
> -#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */
> -#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */
> -#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
> +#define MADV_MERGEABLE 12> > > /* KSM may merge identical pages */
> +#define MADV_UNMERGEABLE 13> > > /* KSM may not merge identical pages */
>
> -#define MADV_MERGEABLE 65> > > /* KSM may merge identical pages */
> -#define MADV_UNMERGEABLE 66> > > /* KSM may not merge identical pages */
> +#define MADV_HUGEPAGE> > 14> > > /* Worth backing with hugepages */
> +#define MADV_NOHUGEPAGE> > 15> > > /* Not worth backing with hugepages */
>
> -#define MADV_HUGEPAGE> > 67> > > /* Worth backing with hugepages */
> -#define MADV_NOHUGEPAGE> > 68> > > /* Not worth backing with hugepages */
> -
> -#define MADV_DONTDUMP 69> > > /* Explicity exclude from the core dump,
> +#define MADV_DONTDUMP 16> > > /* Explicity exclude from the core dump,
> > > > > > > overrides the coredump filter bits */
> -#define MADV_DODUMP> > 70> > > /* Clear the MADV_NODUMP flag */
> +#define MADV_DODUMP> > 17> > > /* Clear the MADV_NODUMP flag */
>
> /* compatibility flags */
> #define MAP_FILE> > 0
--
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2015-11-21 20:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 21:38 [PATCH 0/9] Add Huge Page support for parisc Helge Deller
2015-11-20 21:38 ` [PATCH 1/9] parisc: Fix wrong comment regarding first pmd entry flags Helge Deller
2015-11-20 21:38 ` [PATCH 2/9] parisc: Drop definition of start_thread_som for HP-UX SOM binaries Helge Deller
2015-11-20 21:38 ` [PATCH 3/9] parisc: Fix asm/mman.h regarding MAP_HUGETLB and MADV_XX flags Helge Deller
2015-11-21 20:57 ` Ben Hutchings [this message]
2015-11-21 22:22 ` Helge Deller
2015-11-22 2:21 ` Ben Hutchings
2015-11-22 11:10 ` Helge Deller
2015-11-20 21:38 ` [PATCH 4/9] parisc: Add defines for Huge page support Helge Deller
2015-11-20 21:38 ` [PATCH 5/9] parisc: Initialize the fault vector earlier in the boot process Helge Deller
2015-11-20 21:38 ` [PATCH 6/9] parisc: Increase initial kernel mapping to 32MB on 64bit kernel Helge Deller
2015-11-20 21:38 ` [PATCH 7/9] parisc: Use long branch to do_syscall_trace_exit Helge Deller
2015-11-20 21:38 ` [PATCH 8/9] parisc: Add Huge Page and HUGETLBFS support Helge Deller
2015-11-20 21:38 ` [PATCH 9/9] parisc: Map kernel text and data on huge pages Helge Deller
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=1448139427.17638.16.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
--cc=stable@vger.kernel.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