All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Daisuke Nishimura
	<nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org>,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	rjw-KKrjLPT3xs0@public.gmane.org,
	linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org
Subject: Re: [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach()
Date: Thu, 25 Aug 2011 17:37:50 +0900	[thread overview]
Message-ID: <20110825173750.4959360f.kamezawa.hiroyu__35277.7292406701$1314261958$gmane$org@jp.fujitsu.com> (raw)
In-Reply-To: <CAOS58YPM=cuWjAF+VJ4QJ8bnRcVtaDCVXBJCpdWg+2=2GmnKrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, 25 Aug 2011 10:40:06 +0200
Tejun Heo <tj@kernel.org> wrote:

> Hello,
> 
> On Thu, Aug 25, 2011 at 10:21 AM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> >> Hmmm... the above is basically identity transformation of the existing
> >> code.  If the above is broken, the current code is broken too.  Is it?
> >>
> > Current code is not broken.
> 
> Trust me.  If the posted code is broken, the current code is too. It
> is an IDENTITY transformation.
> 
> > mem_cgroup_can_attach(....., task) need to do real job only when task->mm->owner
> > == task. In this modification, you pass a set of task at once.
> 
> Before the change, cgroup would migrate multiple tasks all the same
> but memcg wouldn't have noticed it unless it opted in explicitly using
> [can_]attach_task(). When multiple tasks were moving, [can_]attach()
> would only be called with the leader whether the leader actually is
> changing cgroup or not. The interface sucked and it wasn't properly
> documented but that's what was happening. The interface change is just
> making the breakage obvious - +1 for the new interface. :)
> 
Thank you for clarification. Ok, current code is broken.


> > So, mem_cgroup_can_attach() need to check _all_ tasks in tset rather than a
> > first task in tset. please scan and find mm->owner.
> >
> > Anyway, if you merge this onto mm-tree first, I think I can have time to
> > write a fix up if complicated.
> 
> As for specific merging order, it shouldn't matter all that much but
> if you wanna backport fixes for -stable, maybe it would make more
> sense to sequence the fix before this change.
> 
> Thank you.

Sure. IIUC, the case thread_leader != mm->owner is uncommon. 
I'll consider a fix onto your fix, first.

I'll cosinder a fix for stable tree if someone requests.

Thanks,
-Kame

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

  parent reply	other threads:[~2011-08-25  8:37 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 22:19 [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods Tejun Heo
2011-08-23 22:19 ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
2011-08-24  0:32   ` Frederic Weisbecker
2011-08-24  0:32   ` Frederic Weisbecker
2011-08-24  1:31     ` Li Zefan
2011-08-24  1:31     ` Li Zefan
2011-08-24  1:31     ` Li Zefan
     [not found]   ` <1314138000-2049-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-24  0:32     ` Frederic Weisbecker
2011-08-23 22:19 ` Tejun Heo
2011-08-23 22:19 ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-23 22:19 ` Tejun Heo
2011-08-25  8:51   ` Paul Menage
     [not found]     ` <CALdu-PAj1ZUmB2ixxA6yeppB8MerBGk1cSeQadobH0H4cRSe7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:03       ` Tejun Heo
2011-08-25  9:03     ` Tejun Heo
2011-08-25  9:03     ` Tejun Heo
2011-08-25  8:51   ` Paul Menage
     [not found]   ` <1314138000-2049-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25  8:51     ` Paul Menage
2011-08-25  9:42     ` Paul Menage
2011-08-25  9:42   ` Paul Menage
2011-08-25  9:42   ` Paul Menage
     [not found]     ` <CALdu-PBr-tu1qzScvncr-N4EpPaQ7sTdHf28GhEv_MZLbo1eSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:44       ` Tejun Heo
2011-08-25  9:44     ` Tejun Heo
2011-08-25  9:44     ` Tejun Heo
2011-08-23 22:19 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-25  0:39   ` KAMEZAWA Hiroyuki
2011-08-25  0:39   ` KAMEZAWA Hiroyuki
2011-08-25  8:20     ` Tejun Heo
2011-08-25  8:20     ` Tejun Heo
     [not found]       ` <20110825082049.GC3286-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-25  8:21         ` KAMEZAWA Hiroyuki
2011-08-25  8:21       ` KAMEZAWA Hiroyuki
2011-08-25  8:40         ` Tejun Heo
     [not found]         ` <20110825172140.eb34809f.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-08-25  8:40           ` Tejun Heo
2011-08-25  8:40         ` Tejun Heo
2011-08-25  8:37           ` KAMEZAWA Hiroyuki
     [not found]           ` <CAOS58YPM=cuWjAF+VJ4QJ8bnRcVtaDCVXBJCpdWg+2=2GmnKrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  8:37             ` KAMEZAWA Hiroyuki [this message]
2011-08-25  8:37           ` KAMEZAWA Hiroyuki
2011-08-25  8:21       ` KAMEZAWA Hiroyuki
     [not found]     ` <20110825093958.75b95bd8.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-08-25  8:20       ` Tejun Heo
2011-08-25  9:14   ` Paul Menage
2011-08-25  9:20     ` Tejun Heo
2011-08-25  9:32       ` Paul Menage
2011-08-25  9:32       ` Paul Menage
     [not found]       ` <20110825092045.GG3286-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-25  9:32         ` Paul Menage
     [not found]     ` <CALdu-PDAgqeRJt5vqTB9wddwz70Yn+Jf-Pb0dDKDBD_q37tHQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:20       ` Tejun Heo
2011-08-25  9:20     ` Tejun Heo
     [not found]   ` <1314138000-2049-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25  0:39     ` KAMEZAWA Hiroyuki
2011-08-25  9:14     ` Paul Menage
2011-08-25  9:32     ` Paul Menage
2011-08-25  9:14   ` Paul Menage
2011-08-25  9:32   ` Paul Menage
2011-08-25  9:32   ` Paul Menage
     [not found] ` <1314138000-2049-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-23 22:19   ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
2011-08-23 22:19   ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-23 22:19   ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-23 22:19   ` [PATCH 4/6] cgroup: don't use subsys->can_attach_task() or ->attach_task() Tejun Heo
2011-08-23 22:19   ` [PATCH 5/6] cgroup, cpuset: don't use ss->pre_attach() Tejun Heo
2011-08-23 22:20   ` [PATCH 6/6] cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task() Tejun Heo
2011-08-24  1:14   ` [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods Frederic Weisbecker
2011-08-23 22:19 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-23 22:19 ` [PATCH 4/6] cgroup: don't use subsys->can_attach_task() or ->attach_task() Tejun Heo
2011-08-23 22:19 ` Tejun Heo
2011-08-24  1:57   ` Matt Helsley
2011-08-24  1:57   ` Matt Helsley
     [not found]     ` <20110824015739.GE28444-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-08-24  7:54       ` Tejun Heo
2011-08-24  7:54     ` Tejun Heo
2011-08-24  7:54     ` Tejun Heo
     [not found]   ` <1314138000-2049-5-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-24  1:57     ` Matt Helsley
2011-08-25  9:07     ` Paul Menage
2011-08-25  9:07   ` Paul Menage
2011-08-25  9:07   ` Paul Menage
2011-08-25  9:12     ` Tejun Heo
2011-08-25  9:12     ` Tejun Heo
     [not found]     ` <CALdu-PCc2RzedXubReF9huamL6W+5qGCfXNNvqS2yUk3QTHRng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:12       ` Tejun Heo
2011-08-23 22:19 ` [PATCH 5/6] cgroup, cpuset: don't use ss->pre_attach() Tejun Heo
2011-08-25  8:53   ` Paul Menage
2011-08-25  9:06     ` Tejun Heo
2011-08-25  9:06     ` Tejun Heo
     [not found]     ` <CALdu-PD5EbFJBRHf-iehPwb6vyJTYUTWZniihARFDZ7xRZ8_nQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:06       ` Tejun Heo
2011-08-25  8:53   ` Paul Menage
     [not found]   ` <1314138000-2049-6-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25  8:53     ` Paul Menage
2011-08-23 22:19 ` Tejun Heo
2011-08-23 22:20 ` [PATCH 6/6] cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task() Tejun Heo
2011-08-23 22:20 ` Tejun Heo
2011-08-25  9:45   ` Paul Menage
     [not found]   ` <1314138000-2049-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25  9:45     ` Paul Menage
2011-08-25  9:45   ` Paul Menage
2011-08-24  1:14 ` [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods Frederic Weisbecker
2011-08-24  7:49   ` Tejun Heo
2011-08-24  7:49   ` Tejun Heo
2011-08-24  7:49   ` Tejun Heo
2011-08-24 13:53     ` Frederic Weisbecker
2011-08-24 13:53     ` Frederic Weisbecker
     [not found]     ` <20110824074959.GA14170-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-24 13:53       ` Frederic Weisbecker
2011-08-24  1:14 ` Frederic Weisbecker
2011-08-25 22:43 [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods, take#2 Tejun Heo
2011-08-25 22:43 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-26  2:38   ` Matt Helsley
     [not found]   ` <1314312192-26885-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  2:38     ` Matt Helsley
2011-08-26  4:16     ` KAMEZAWA Hiroyuki
2011-08-26  2:38   ` Matt Helsley
2011-08-26  2:48     ` Matt Helsley
2011-08-26  2:48     ` Matt Helsley
2011-08-26  6:40     ` Tejun Heo
     [not found]     ` <20110826023818.GC3457-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-08-26  2:48       ` Matt Helsley
2011-08-26  6:40       ` Tejun Heo
2011-08-26 15:54       ` Paul Menage
2011-08-26  6:40     ` Tejun Heo
2011-08-26 15:54     ` Paul Menage
2011-08-26 15:54     ` Paul Menage
2011-08-26  4:16   ` KAMEZAWA Hiroyuki
2011-08-26  4:16   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` Tejun Heo
     [not found] ` <1314312192-26885-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25 22:43   ` Tejun Heo

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='20110825173750.4959360f.kamezawa.hiroyu__35277.7292406701$1314261958$gmane$org@jp.fujitsu.com' \
    --to=kamezawa.hiroyu-+cum20s59erqfuhtdcdx3a@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org \
    --cc=paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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.