From: David Rientjes <rientjes@google.com>
To: David Mackey <tdmackey@twitter.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andi Kleen <ak@linux.intel.com>,
penberg@kernel.org, cl@linux.com
Subject: Re: [PATCH v5] slab/mempolicy: always use local policy from interrupt context
Date: Sat, 9 Jun 2012 19:19:13 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1206091917580.7832@chino.kir.corp.google.com> (raw)
In-Reply-To: <1339234803-21106-1-git-send-email-tdmackey@twitter.com>
On Sat, 9 Jun 2012, David Mackey wrote:
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index f15c1b2..cb0b230 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -1602,8 +1602,14 @@ static unsigned interleave_nodes(struct mempolicy *policy)
> * task can change it's policy. The system default policy requires no
> * such protection.
> */
> -unsigned slab_node(struct mempolicy *policy)
> +unsigned slab_node(void)
> {
> + struct mempolicy *policy;
> +
> + if (in_interrupt())
> + return numa_node_id();
> +
> + policy = current->mempolicy;
> if (!policy || policy->flags & MPOL_F_LOCAL)
> return numa_node_id();
>
Should probably be numa_mem_id() in both these cases for
CONFIG_HAVE_MEMORYLESS_NODES, but it won't cause a problem in this form
either.
Acked-by: David Rientjes <rientjes@google.com>
--
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:[~2012-06-10 2:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1338438844-5022-1-git-send-email-andi@firstfloor.org>
2012-06-09 9:40 ` David Mackey
2012-06-10 2:19 ` David Rientjes [this message]
2012-06-17 1:11 ` David Rientjes
2012-06-17 10:37 ` Pekka Enberg
2012-06-11 15:05 ` Christoph Lameter
2012-06-18 8:20 ` KOSAKI Motohiro
2012-06-20 7:02 ` Pekka Enberg
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=alpine.DEB.2.00.1206091917580.7832@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=ak@linux.intel.com \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=tdmackey@twitter.com \
/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