From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: David Mackey <tdmackey@twitter.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
rientjes@google.com, Andi Kleen <ak@linux.intel.com>,
penberg@kernel.org, cl@linux.com, kosaki.motohiro@gmail.com
Subject: Re: [PATCH v5] slab/mempolicy: always use local policy from interrupt context
Date: Mon, 18 Jun 2012 04:20:54 -0400 [thread overview]
Message-ID: <4FDEE4E6.6030205@gmail.com> (raw)
In-Reply-To: <1339234803-21106-1-git-send-email-tdmackey@twitter.com>
(6/9/12 5:40 AM), David Mackey wrote:
> From: Andi Kleen<ak@linux.intel.com>
>
> From: Andi Kleen<ak@linux.intel.com>
>
> slab_node() could access current->mempolicy from interrupt context.
> However there's a race condition during exit where the mempolicy
> is first freed and then the pointer zeroed.
>
> Using this from interrupts seems bogus anyways. The interrupt
> will interrupt a random process and therefore get a random
> mempolicy. Many times, this will be idle's, which noone can change.
>
> Just disable this here and always use local for slab
> from interrupts. I also cleaned up the callers of slab_node a bit
> which always passed the same argument.
>
> I believe the original mempolicy code did that in fact,
> so it's likely a regression.
>
> v2: send version with correct logic
> v3: simplify. fix typo.
> Reported-by: Arun Sharma<asharma@fb.com>
> Cc: penberg@kernel.org
> Cc: cl@linux.com
> Signed-off-by: Andi Kleen<ak@linux.intel.com>
> [tdmackey@twitter.com: Rework control flow based on feedback from
> cl@linux.com, fix logic, and cleanup current task_struct reference]
> Signed-off-by: David Mackey<tdmackey@twitter.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.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-18 8:20 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 ` [PATCH v5] slab/mempolicy: always use local policy from interrupt context David Mackey
2012-06-10 2:19 ` David Rientjes
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 [this message]
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=4FDEE4E6.6030205@gmail.com \
--to=kosaki.motohiro@gmail.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=rientjes@google.com \
--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;
as well as URLs for NNTP newsgroup(s).