From: Andi Kleen <ak@suse.de>
To: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mel@skynet.ie,
eric.whitney@hp.com, clameter@sgi.com
Subject: Re: [PATCH/RFC 1/8] Mem Policy: Write lock mmap_sem while changing task mempolicy
Date: Thu, 6 Dec 2007 22:24:58 +0100 [thread overview]
Message-ID: <200712062224.58812.ak@suse.de> (raw)
In-Reply-To: <20071206212053.6279.27183.sendpatchset@localhost>
On Thursday 06 December 2007 22:20:53 Lee Schermerhorn wrote:
> PATCH/RFC 01/08 Mem Policy: Write lock mmap_sem while changing task mempolicy
>
> Against: 2.6.24-rc2-mm1
>
> A read of /proc/<pid>/numa_maps holds the target task's mmap_sem
> for read while examining each vma's mempolicy. A vma's mempolicy
> can fall back to the task's policy. However, the task could be
> changing it's task policy and free the one that the show_numa_maps()
> is examining.
But do_set_mempolicy doesn't actually modify the mempolicy. It just
replaces it using essentially Copy-on-write.
If the numa_maps holds a proper reference count (I haven't
checked if it does) it can keep the old unmodified one as long as it wants.
I don't think a write lock is needed.
-Andi
--
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:[~2007-12-06 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 21:20 [PATCH/RFC 0/8] Mem Policy: More Reference Counting/Fallback Fixes and Misc Cleanups Lee Schermerhorn
2007-12-06 21:20 ` [PATCH/RFC 1/8] Mem Policy: Write lock mmap_sem while changing task mempolicy Lee Schermerhorn
2007-12-06 21:24 ` Andi Kleen [this message]
2007-12-06 21:34 ` Lee Schermerhorn
2007-12-06 21:20 ` [PATCH/RFC 2/8] Mem Policy: Fixup Fallback for Default Shmem Policy Lee Schermerhorn
2007-12-06 21:21 ` [PATCH/RFC 3/8] Mem Policy: Mark shared policies for unref Lee Schermerhorn
2007-12-06 21:21 ` [PATCH/RFC 4/8] Mem Policy: Document {set|get}_policy() vm_ops APIs Lee Schermerhorn
2007-12-06 21:21 ` [PATCH/RFC 5/8] Mem Policy: Rework mempolicy Reference Counting [yet again] Lee Schermerhorn
2007-12-06 21:21 ` [PATCH/RFC 6/8] Mem Policy: Use MPOL_PREFERRED for system-wide default policy Lee Schermerhorn
2007-12-06 21:21 ` [PATCH/RFC 7/8] Mem Policy: MPOL_PREFERRED cleanups for "local allocation" Lee Schermerhorn
2007-12-06 21:21 ` [PATCH/RFC 8/8] Mem Policy: Fix up MPOL_BIND documentation Lee Schermerhorn
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=200712062224.58812.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=eric.whitney@hp.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
/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.