From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: aarcange@redhat.com, akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/THP: Don't use HPAGE_SHIFT in transparent hugepage code
Date: Tue, 7 May 2013 01:07:57 +0300 [thread overview]
Message-ID: <20130506220757.GA23468@shutemov.name> (raw)
In-Reply-To: <1367873552-12904-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Tue, May 07, 2013 at 02:22:32AM +0530, Aneesh Kumar K.V wrote:
> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>
> For architectures like powerpc that support multiple explicit hugepage
> sizes, HPAGE_SHIFT indicate the default explicit hugepage shift. For
> THP to work the hugepage size should be same as PMD_SIZE. So use
> PMD_SHIFT directly. So move the define outside CONFIG_TRANSPARENT_HUGEPAGE
> #ifdef because we want to use these defines in generic code with
> if (pmd_trans_huge()) conditional.
Sorry, I haven't got why you move it outside #ifdef.
If CONFIG_TRANSPARENT_HUGEPAGE disabled pmd_trans_huge() will be 0 in
compile time, so BUILD_BUG() will be optimize out by GCC.
The BUILD_BUGs are useful. It's bug if you *really* use the defines with
THP disabled.
--
Kirill A. Shutemov
--
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>
next prev parent reply other threads:[~2013-05-06 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 20:52 Aneesh Kumar K.V
2013-05-06 22:07 ` Kirill A. Shutemov [this message]
2013-05-06 22:27 ` Kirill A. Shutemov
2013-05-07 3:28 ` Aneesh Kumar K.V
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=20130506220757.GA23468@shutemov.name \
--to=kirill@shutemov.name \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-mm@kvack.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