From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
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: Thu, 02 Jan 2014 23:29:46 +1100 [thread overview]
Message-ID: <1388665786.4373.48.camel@pasglop> (raw)
In-Reply-To: <87zjneodtw.fsf@linux.vnet.ibm.com>
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
Cheers,
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
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: Thu, 02 Jan 2014 23:29:46 +1100 [thread overview]
Message-ID: <1388665786.4373.48.camel@pasglop> (raw)
In-Reply-To: <87zjneodtw.fsf@linux.vnet.ibm.com>
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
Cheers,
Ben.
--
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-02 12:30 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 [this message]
2014-01-02 12:29 ` Benjamin Herrenschmidt
2014-01-03 5:28 ` Aneesh Kumar K.V
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=1388665786.4373.48.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=aarcange@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--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.