From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: linux-mm@kvack.org
Cc: Oleg Nesterov <oleg@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: mempolicy ref-counting question
Date: Tue, 21 Apr 2015 00:02:56 +0200 [thread overview]
Message-ID: <87pp6y31bj.fsf@rasmusvillemoes.dk> (raw)
I'm trying to understand why "git grep mpol_get" doesn't give more hits
than it does. Two of the users (kernel/sched/debug.c and
fs/proc/task_mmu.c) seem to only hold the extra reference while writing
to a seq_file. That leaves just three actual users.
In particular, I'm wondering why __split_vma (and copy_vma) use
vma_dup_policy instead of simply getting an extra reference on the
old. I see there's some cpuset_being_rebound dance in mpol_dup, but I
don't understand why that's needed: In __split_vma, we're holding
mmap_sem, so either update_tasks_nodemask has already visited this mm
via mpol_rebind_mm (which also takes the mmap_sem), so the old vma is
already rebound, or the mpol_rebind_mm call will come later and rebind
the mempolicy of both the old and new vma - why would it matter that the
new vma's policy is rebound immediately?
I'd appreciate it if someone could enlighten me (I'm probably
missing something obvious).
Rasmus
--
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 reply other threads:[~2015-04-20 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 22:02 Rasmus Villemoes [this message]
2015-04-21 14:41 ` Oleg Nesterov
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=87pp6y31bj.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.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