From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Paul Menage <menage@google.com>
Cc: lizf@cn.fujitzu.com, containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org,
libcg-devel <libcg-devel@lists.sourceforge.net>,
akpm@linux-foundation.org, bblum@google.com
Subject: Re: [PATCH 0/2] CGroups: cgroup member list enhancement/fix
Date: Tue, 14 Jul 2009 12:46:17 +0530 [thread overview]
Message-ID: <20090714071617.GK5051@balbir.in.ibm.com> (raw)
In-Reply-To: <6599ad830907132349u6cf52060t4fafb6637cbe4ed1@mail.gmail.com>
* menage@google.com <menage@google.com> [2009-07-13 23:49:16]:
> On Mon, Jul 13, 2009 at 10:56 PM, Balbir Singh<balbir@linux.vnet.ibm.com> wrote:
> >>
> >> Waiting for the next scheduling point might be too long, since a
> >> thread can block for arbitrary amounts of time and keeping the marker
> >> around for arbitrary time (unless we add a new task_struct field)
> >> would be tricky. Marking the cgroup or tgid as being migrated which
> >> then triggers the extra synchronization in the fork path (but which
> >> isn't needed at other times) is probably where we'll end up.
> >
> >
> > Hmm... but we would not need that information till we schedule the
> > tasks, adding a field to task_struct is what I had in mind.
>
> Waiting until schedule to move the threads would result in them still
> showing up in the old "tasks" file until they next ran, which would be
> confusing and misleading.
>
Yes, agreed, even first access to the data struture based lazy
migration might not be too helpful, since it can be very context
dependent.
> As a first cut, we were planning to add an rwsem that gets taken for
> read in cgroup_fork(), released in cgroup_post_fork(), and taken for
> write when moving an entire process to a new cgroup; not ideal
> performance-wise, but safe.
>
> If adding a field to task_struct is an option, then the rwsem could be
> per thread-group leader, which would reduce contention.
>
We should also document that moving large processes with several
threads can be expensive.
--
Balbir
next prev parent reply other threads:[~2009-07-14 7:16 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 23:26 Paul Menage
2009-07-02 23:26 ` [PATCH 1/2] Adds a read-only "procs" file similar to "tasks" that shows only unique tgids Paul Menage
2009-07-02 23:46 ` Andrew Morton
2009-07-03 0:31 ` Benjamin Blum
2009-07-03 0:53 ` Andrew Morton
2009-07-03 1:08 ` Paul Menage
2009-07-03 1:17 ` Benjamin Blum
2009-07-03 2:08 ` Andrew Morton
2009-07-03 4:16 ` Paul Menage
2009-07-03 6:55 ` Andrew Morton
2009-07-03 7:54 ` KAMEZAWA Hiroyuki
2009-07-03 16:11 ` Paul Menage
2009-07-03 16:50 ` Andrew Morton
2009-07-03 17:54 ` Paul Menage
2009-07-03 18:10 ` Andrew Morton
2009-07-15 8:33 ` Eric W. Biederman
2009-07-15 16:18 ` Paul Menage
2009-07-03 2:25 ` Matt Helsley
2009-07-03 3:49 ` Paul Menage
2009-07-03 7:08 ` Benjamin Blum
2009-07-03 1:30 ` Andrew Morton
2009-07-03 5:54 ` KAMEZAWA Hiroyuki
2009-07-03 15:52 ` Paul Menage
2009-07-04 2:07 ` KAMEZAWA Hiroyuki
2009-07-04 16:10 ` Paul Menage
2009-07-05 23:53 ` KAMEZAWA Hiroyuki
2009-07-02 23:26 ` [PATCH 2/2] Ensures correct concurrent opening/reading of pidlists across pid namespaces Paul Menage
2009-07-02 23:54 ` Andrew Morton
2009-07-03 0:22 ` Paul Menage
2009-07-03 0:26 ` Paul Menage
2009-07-03 0:43 ` Benjamin Blum
2009-07-03 1:15 ` [PATCH 0/2] CGroups: cgroup member list enhancement/fix Li Zefan
2009-07-05 6:38 ` Balbir Singh
2009-07-10 23:58 ` Paul Menage
2009-07-13 12:11 ` Balbir Singh
2009-07-13 16:26 ` Paul Menage
2009-07-14 5:56 ` Balbir Singh
2009-07-14 6:49 ` Paul Menage
2009-07-14 7:16 ` Balbir Singh [this message]
2009-07-14 17:34 ` Benjamin Blum
2009-07-14 17:43 ` Paul Menage
2009-07-14 20:38 ` Paul Menage
2009-07-14 23:08 ` Matt Helsley
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=20090714071617.GK5051@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bblum@google.com \
--cc=containers@lists.linux-foundation.org \
--cc=libcg-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitzu.com \
--cc=menage@google.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
all inboxes | Powered by JetHome®