From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: "Paul Menage" <menage@google.com>
Cc: "Paul Jackson" <pj@sgi.com>,
akpm@linux-foundation.org, dev@sw.ru, xemul@sw.ru,
serue@us.ibm.com, ebiederm@xmission.com, haveblue@us.ibm.com,
svaidy@linux.vnet.ibm.com, balbir@in.ibm.com,
ckrm-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org,
rohitseth@google.com, mbligh@google.com,
containers@lists.osdl.org, devel@openvz.org
Subject: Re: [PATCH 0/9] Containers (V9): Generic Process Containers
Date: Mon, 30 Apr 2007 23:36:53 +0530 [thread overview]
Message-ID: <20070430180653.GA31001@in.ibm.com> (raw)
In-Reply-To: <6599ad830704301009k11100a78we98e20deba9b1fdc@mail.gmail.com>
On Mon, Apr 30, 2007 at 10:09:38AM -0700, Paul Menage wrote:
> Paul, is there any reason why we need to do a write_lock() on
> tasklist_lock if we're just trying to block fork, or is it just
> historical accident? Wouldn't it be fine to do a read_lock()?
Good point ..read_lock() will probably suffice in update_nodemask which
means we don't need the patch I sent earlier.
Paul (Jackson),
This made me see another race in update_nodemask vs fork:
Lets say cpuset CS1 has only one task T1 to begin with.
update_nodemask(CS1) T1 in do_fork()
CPU0 CPU1
=============================================================
cpuset_fork();
mpol_copy();
ntasks = atomic_read(&cs->count);
[ntasks = 2, accounting new born child T2]
cs->mems_allowed = something;
set_cpuset_being_rebound()
write/read_lock(tasklist_lock);
do_each_thread {
/* Finds only T1 */
mmarray[] = ..
} while_each_thread();
write/read_unlock(tasklist_lock);
write_lock(tasklist_lock);
/* Add T2, child of T1 to tasklist */
write_unlock(tasklist_lock);
for (i = 0; i < n; i++) {
mpol_rebind_mm(..);
}
In this for loop, we migrate only T1's ->mm. T2's->mm isn't migrated
AFAICS.
Is that fine?
--
Regards,
vatsa
next prev parent reply other threads:[~2007-04-30 17:58 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-27 10:46 [PATCH 0/9] Containers (V9): Generic Process Containers menage
2007-04-27 10:46 ` [PATCH 1/9] Containers (V9): Basic container framework menage
2007-04-29 3:12 ` [ckrm-tech] " Paul Jackson
2007-05-01 17:40 ` Balbir Singh
2007-05-01 17:46 ` Paul Menage
2007-05-01 18:40 ` [ckrm-tech] " Paul Jackson
2007-05-02 3:44 ` Balbir Singh
2007-05-02 6:12 ` Paul Jackson
2007-05-10 4:09 ` Balbir Singh
2007-05-10 4:47 ` Paul Jackson
2007-05-10 4:49 ` Balbir Singh
2007-04-27 10:46 ` [PATCH 2/9] Containers (V9): Example CPU accounting subsystem menage
2007-05-01 17:52 ` Balbir Singh
2007-04-27 10:46 ` [PATCH 3/9] Containers (V9): Add tasks file interface menage
2007-05-01 18:12 ` Balbir Singh
2007-05-01 20:37 ` [ckrm-tech] " Paul Menage
2007-05-02 3:25 ` Srivatsa Vaddagiri
2007-05-02 3:25 ` Paul Menage
2007-05-02 3:46 ` Srivatsa Vaddagiri
2007-05-08 14:51 ` Balbir Singh
2007-05-10 21:21 ` Paul Menage
2007-05-11 2:31 ` Balbir Singh
2007-05-02 3:58 ` Balbir Singh
2007-04-27 10:46 ` [PATCH 4/9] Containers (V9): Add fork/exit hooks menage
2007-04-27 10:46 ` [PATCH 5/9] Containers (V9): Add container_clone() interface menage
2007-04-27 10:46 ` [PATCH 6/9] Containers (V9): Add procfs interface menage
2007-04-27 10:46 ` [PATCH 7/9] Containers (V9): Make cpusets a client of containers menage
2007-04-27 10:46 ` [PATCH 8/9] Containers (V9): Share css_group arrays between tasks with same container memberships menage
2007-04-27 10:46 ` [PATCH 9/9] Containers (V9): Simple debug info subsystem menage
2007-04-29 1:47 ` [PATCH 0/9] Containers (V9): Generic Process Containers Paul Jackson
2007-04-29 9:37 ` Paul Jackson
2007-04-30 17:12 ` Srivatsa Vaddagiri
2007-04-30 17:09 ` Paul Menage
2007-04-30 18:06 ` Srivatsa Vaddagiri [this message]
2007-04-30 17:23 ` Christoph Hellwig
2007-04-30 18:16 ` [ckrm-tech] " Srivatsa Vaddagiri
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=20070430180653.GA31001@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=containers@lists.osdl.org \
--cc=dev@sw.ru \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=menage@google.com \
--cc=pj@sgi.com \
--cc=rohitseth@google.com \
--cc=serue@us.ibm.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=xemul@sw.ru \
/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