From: Ingo Molnar <mingo@kernel.org>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Andres Lagar-Cavilla <andreslc@google.com>,
Yang Shi <yang.shi@linaro.org>, Ning Qu <quning@gmail.com>,
Arnd Bergman <arnd@arndb.de>, Ralf Baechle <ralf@linux-mips.org>,
Vineet Gupta <vgupta@synopsys.com>,
Russell King <linux@arm.linux.org.uk>,
Will Deacon <will.deacon@arm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
David Miller <davem@davemloft.net>,
Chris Metcalf <cmetcalf@tilera.com>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH 10/10] arch: fix has_transparent_hugepage()
Date: Wed, 6 Apr 2016 08:58:06 +0200 [thread overview]
Message-ID: <20160406065806.GC3078@gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1604051355280.5965@eggly.anvils>
* Hugh Dickins <hughd@google.com> wrote:
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -181,6 +181,7 @@ static inline int pmd_trans_huge(pmd_t p
> return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE;
> }
>
> +#define has_transparent_hugepage has_transparent_hugepage
> static inline int has_transparent_hugepage(void)
> {
> return cpu_has_pse;
Small nit, just writing:
#define has_transparent_hugepage
ought to be enough, right?
In any case:
Acked-by: Ingo Molnar <mingo@kernel.org>
Another nit, this:
> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -806,4 +806,12 @@ static inline int pmd_clear_huge(pmd_t *
> #define io_remap_pfn_range remap_pfn_range
> #endif
>
> +#ifndef has_transparent_hugepage
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +#define has_transparent_hugepage() 1
> +#else
> +#define has_transparent_hugepage() 0
> +#endif
> +#endif
Looks a bit more structured as:
#ifndef has_transparent_hugepage
# ifdef CONFIG_TRANSPARENT_HUGEPAGE
# define has_transparent_hugepage() 1
# else
# define has_transparent_hugepage() 0
# endif
#endif
BYMMV.
Thanks,
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Andres Lagar-Cavilla <andreslc@google.com>,
Yang Shi <yang.shi@linaro.org>, Ning Qu <quning@gmail.com>,
Arnd Bergman <arnd@arndb.de>, Ralf Baechle <ralf@linux-mips.org>,
Vineet Gupta <vgupta@synopsys.com>,
Russell King <linux@arm.linux.org.uk>,
Will Deacon <will.deacon@arm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
David Miller <davem@davemloft.net>,
Chris Metcalf <cmetcalf@tilera.com>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH 10/10] arch: fix has_transparent_hugepage()
Date: Wed, 6 Apr 2016 08:58:06 +0200 [thread overview]
Message-ID: <20160406065806.GC3078@gmail.com> (raw)
Message-ID: <20160406065806.hMn4GGYv54Iet1S6KxcXVvO3dpMd01eHKnDsYBb8bJs@z> (raw)
In-Reply-To: <alpine.LSU.2.11.1604051355280.5965@eggly.anvils>
* Hugh Dickins <hughd@google.com> wrote:
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -181,6 +181,7 @@ static inline int pmd_trans_huge(pmd_t p
> return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE;
> }
>
> +#define has_transparent_hugepage has_transparent_hugepage
> static inline int has_transparent_hugepage(void)
> {
> return cpu_has_pse;
Small nit, just writing:
#define has_transparent_hugepage
ought to be enough, right?
In any case:
Acked-by: Ingo Molnar <mingo@kernel.org>
Another nit, this:
> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -806,4 +806,12 @@ static inline int pmd_clear_huge(pmd_t *
> #define io_remap_pfn_range remap_pfn_range
> #endif
>
> +#ifndef has_transparent_hugepage
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +#define has_transparent_hugepage() 1
> +#else
> +#define has_transparent_hugepage() 0
> +#endif
> +#endif
Looks a bit more structured as:
#ifndef has_transparent_hugepage
# ifdef CONFIG_TRANSPARENT_HUGEPAGE
# define has_transparent_hugepage() 1
# else
# define has_transparent_hugepage() 0
# endif
#endif
BYMMV.
Thanks,
Ingo
next prev parent reply other threads:[~2016-04-06 6:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LSU.2.11.1604051329480.5965@eggly.anvils>
2016-04-05 21:02 ` [PATCH 10/10] arch: fix has_transparent_hugepage() Hugh Dickins
2016-04-05 21:02 ` Hugh Dickins
2016-04-05 23:25 ` David Miller
2016-04-05 23:25 ` David Miller
2016-04-06 3:22 ` Vineet Gupta
2016-04-06 6:58 ` Ingo Molnar [this message]
2016-04-06 6:58 ` Ingo Molnar
2016-04-06 12:29 ` Chris Metcalf
2016-04-06 21:58 ` Ingo Molnar
2016-04-06 11:56 ` Gerald Schaefer
2016-04-06 11:56 ` Gerald Schaefer
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=20160406065806.GC3078@gmail.com \
--to=mingo@kernel.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andreslc@google.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=cmetcalf@tilera.com \
--cc=davem@davemloft.net \
--cc=gerald.schaefer@de.ibm.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=mpe@ellerman.id.au \
--cc=quning@gmail.com \
--cc=ralf@linux-mips.org \
--cc=schwidefsky@de.ibm.com \
--cc=vgupta@synopsys.com \
--cc=will.deacon@arm.com \
--cc=yang.shi@linaro.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