From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: aarcange@redhat.com, linuxppc-dev@lists.ozlabs.org,
paulus@samba.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
linux-mm@kvack.org
Subject: Re: [PATCH -V2] powerpc: thp: Fix crash on mremap
Date: Fri, 03 Jan 2014 10:58:14 +0530 [thread overview]
Message-ID: <87wqihocr5.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1388665786.4373.48.camel@pasglop>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Thu, 2014-01-02 at 16:22 +0530, Aneesh Kumar K.V wrote:
>> > Just use config option directly:
>> >
>> > if (new_ptl != old_ptl ||
>> > IS_ENABLED(CONFIG_ARCH_THP_MOVE_PMD_ALWAYS_WITHDRAW))
>>
>>
>> I didn't like that. I found the earlier one easier for reading.
>> If you and others strongly feel about this, I can redo the patch.
>> Please let me know
>
> Yes, use IS_ENABLED, no need to have two indirections of #define's
>
> Another option is to have
>
> if (pmd_move_must_withdraw(new,old)) {
> }
>
> With in a generic header:
>
> #ifndef pmd_move_must_withdraw
> static inline bool pmd_move_must_withdraw(spinlock_t *new_ptl, ...)
> {
> return new_ptl != old_ptl;
> }
> #endif
>
> And in powerpc:
>
> static inline bool pmd_move_must_withdraw(spinlock_t *new_ptl, ...)
> {
> return true;
> }
> #define pmd_move_must_withdraw pmd_move_must_withdraw
This is better i guess. It is also in-line with rest of transparent
hugepage functions. I will do this.
-aneesh
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
paulus@samba.org, aarcange@redhat.com,
linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org
Subject: Re: [PATCH -V2] powerpc: thp: Fix crash on mremap
Date: Fri, 03 Jan 2014 10:58:14 +0530 [thread overview]
Message-ID: <87wqihocr5.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1388665786.4373.48.camel@pasglop>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Thu, 2014-01-02 at 16:22 +0530, Aneesh Kumar K.V wrote:
>> > Just use config option directly:
>> >
>> > if (new_ptl != old_ptl ||
>> > IS_ENABLED(CONFIG_ARCH_THP_MOVE_PMD_ALWAYS_WITHDRAW))
>>
>>
>> I didn't like that. I found the earlier one easier for reading.
>> If you and others strongly feel about this, I can redo the patch.
>> Please let me know
>
> Yes, use IS_ENABLED, no need to have two indirections of #define's
>
> Another option is to have
>
> if (pmd_move_must_withdraw(new,old)) {
> }
>
> With in a generic header:
>
> #ifndef pmd_move_must_withdraw
> static inline bool pmd_move_must_withdraw(spinlock_t *new_ptl, ...)
> {
> return new_ptl != old_ptl;
> }
> #endif
>
> And in powerpc:
>
> static inline bool pmd_move_must_withdraw(spinlock_t *new_ptl, ...)
> {
> return true;
> }
> #define pmd_move_must_withdraw pmd_move_must_withdraw
This is better i guess. It is also in-line with rest of transparent
hugepage functions. I will do this.
-aneesh
--
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:[~2014-01-03 5:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-02 9:17 [PATCH -V2] powerpc: thp: Fix crash on mremap Aneesh Kumar K.V
2014-01-02 9:17 ` Aneesh Kumar K.V
2014-01-02 9:41 ` Kirill A. Shutemov
2014-01-02 9:41 ` Kirill A. Shutemov
2014-01-02 10:52 ` Aneesh Kumar K.V
2014-01-02 10:52 ` Aneesh Kumar K.V
2014-01-02 12:29 ` Benjamin Herrenschmidt
2014-01-02 12:29 ` Benjamin Herrenschmidt
2014-01-03 5:28 ` Aneesh Kumar K.V [this message]
2014-01-03 5: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=87wqihocr5.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=aarcange@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.