From: Matt Helsley on 6 May 2010 17:50 On Thu, May 06, 2010 at 09:40:19PM +0200, Rafael J. Wysocki wrote: > On Saturday 01 May 2010, Oren Laadan wrote: > > From: Matt Helsley <matthltc(a)us.ibm.com> > > > > Update stale comments regarding locking order and add a little more detail > > so it's easier to follow the locking between the cgroup freezer and the > > power management freezer code. > > I guess these three patches are for me. > > Do you want me to handle them? > > Rafael Hi Rafael, I think you can take 15 as it's an update to the comments. 16 and 17 are specific to checkpoint/restart. There are no other in-kernel uses, that we've identified, for them. So I was under the impression that it's inappropriate to add them without also adding the checkpoint/restart patches that use them. Thanks! Cheers, -Matt Helsley > > > > Signed-off-by: Matt Helsley <matthltc(a)us.ibm.com> > > Cc: Oren Laadan <orenl(a)cs.columbia.edu> > > Cc: Cedric Le Goater <legoater(a)free.fr> > > Cc: Paul Menage <menage(a)google.com> > > Cc: Li Zefan <lizf(a)cn.fujitsu.com> > > Cc: Rafael J. Wysocki <rjw(a)sisk.pl> > > Cc: linux-pm(a)lists.linux-foundation.org > > --- > > kernel/cgroup_freezer.c | 21 +++++++++++++-------- > > 1 files changed, 13 insertions(+), 8 deletions(-) > > > > diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c > > index da5e139..85f19cc 100644 > > --- a/kernel/cgroup_freezer.c > > +++ b/kernel/cgroup_freezer.c > > @@ -89,10 +89,10 @@ struct cgroup_subsys freezer_subsys; > > > > /* Locks taken and their ordering > > * ------------------------------ > > - * css_set_lock > > * cgroup_mutex (AKA cgroup_lock) > > - * task->alloc_lock (AKA task_lock) > > * freezer->lock > > + * css_set_lock > > + * task->alloc_lock (AKA task_lock) > > * task->sighand->siglock > > * > > * cgroup code forces css_set_lock to be taken before task->alloc_lock > > @@ -100,33 +100,38 @@ struct cgroup_subsys freezer_subsys; > > * freezer_create(), freezer_destroy(): > > * cgroup_mutex [ by cgroup core ] > > * > > - * can_attach(): > > - * cgroup_mutex > > + * freezer_can_attach(): > > + * cgroup_mutex (held by caller of can_attach) > > * > > - * cgroup_frozen(): > > + * cgroup_freezing_or_frozen(): > > * task->alloc_lock (to get task's cgroup) > > * > > * freezer_fork() (preserving fork() performance means can't take cgroup_mutex): > > - * task->alloc_lock (to get task's cgroup) > > * freezer->lock > > * sighand->siglock (if the cgroup is freezing) > > * > > * freezer_read(): > > * cgroup_mutex > > * freezer->lock > > + * write_lock css_set_lock (cgroup iterator start) > > + * task->alloc_lock > > * read_lock css_set_lock (cgroup iterator start) > > * > > * freezer_write() (freeze): > > * cgroup_mutex > > * freezer->lock > > + * write_lock css_set_lock (cgroup iterator start) > > + * task->alloc_lock > > * read_lock css_set_lock (cgroup iterator start) > > - * sighand->siglock > > + * sighand->siglock (fake signal delivery inside freeze_task()) > > * > > * freezer_write() (unfreeze): > > * cgroup_mutex > > * freezer->lock > > + * write_lock css_set_lock (cgroup iterator start) > > + * task->alloc_lock > > * read_lock css_set_lock (cgroup iterator start) > > - * task->alloc_lock (to prevent races with freeze_task()) > > + * task->alloc_lock (inside thaw_process(), prevents race with refrigerator()) > > * sighand->siglock > > */ > > static struct cgroup_subsys_state *freezer_create(struct cgroup_subsys *ss, > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Matt Helsley on 6 May 2010 18:40 On Thu, May 06, 2010 at 01:31:17PM -0700, Matt Helsley wrote: > On Thu, May 06, 2010 at 09:40:19PM +0200, Rafael J. Wysocki wrote: > > On Saturday 01 May 2010, Oren Laadan wrote: > > > From: Matt Helsley <matthltc(a)us.ibm.com> > > > > > > Update stale comments regarding locking order and add a little more detail > > > so it's easier to follow the locking between the cgroup freezer and the > > > power management freezer code. > > > > I guess these three patches are for me. > > > > Do you want me to handle them? > > > > Rafael > > Hi Rafael, > > I think you can take 15 as it's an update to the comments. > > 16 and 17 are specific to checkpoint/restart. There are no other in-kernel > uses, that we've identified, for them. So I was under the impression that it's > inappropriate to add them without also adding the checkpoint/restart patches > that use them. Of course, assuming I'm wrong about the dependency on checkpoint/restart, I have no objection to your taking them. Thanks again! Cheers, -Matt Helsley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Matt Helsley on 10 May 2010 17:10 On Mon, May 10, 2010 at 11:01:45PM +0200, Rafael J. Wysocki wrote: > On Thursday 06 May 2010, Oren Laadan wrote: > > > > On 05/06/2010 03:40 PM, Rafael J. Wysocki wrote: > > > On Saturday 01 May 2010, Oren Laadan wrote: > > >> From: Matt Helsley <matthltc(a)us.ibm.com> > > >> > > >> Update stale comments regarding locking order and add a little more detail > > >> so it's easier to follow the locking between the cgroup freezer and the > > >> power management freezer code. > > > > > > I guess these three patches are for me. > > > > > > Do you want me to handle them? > > > > Yes, please, that would be great. > > However, patches 16 and 17 seem to depend on checkpoint/restart and don't > appear to be margeable at this point. Is this correct? Strictly speaking they do not depend on checkpoint/restart. However, only checkpoint/restart uses the functionality introduced by those patches so I think you are correct that they aren't mergeable at this point. Cheers, -Matt Helsley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: Btrfs: add basic DIO read support Next: [PATCH 0/3] [GIT PULL] tracing: various fixes |