cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET cgroup/for-3.16] cgroup: implement cgroup.populated, v2
@ 2014-04-14 21:44 Tejun Heo
       [not found] ` <1397511846-2904-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Tejun Heo @ 2014-04-14 21:44 UTC (permalink / raw)
  To: lizefan-hv44wF8Li93QT0dZR+AlfA
  Cc: rlove-L7G0xEPcOZbYtjvyW6yDsg,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA, kay-tD+1rO4QERM,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	lennart-mdGvqq1h2p+GdvJs77BJ7Q, eparis-FjpueFixGhCM4zKIHC2jIg,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	john-jueV0HHMeujJJrXXpGQQMAC/G2K4zDHf

Hello,

This is v2 of cgroup.populated patchset changes from v1[L] are,

* Rebased on top of v3.15-rc1

* Patch description updated for the third patch as per Serge.

(inotify folks, can you please review the second patch which hooks up
 kernfs_notify() with fsnotify?  It works but directly invoking
 fsnotify_parent() and fsnotify() feels a bit dirty.  Maybe something
 like fsnotify_notify_modify_by_dentry() would make more sense?)

cgroup users often need a way to determine when a cgroup's
subhierarchy becomes empty so that it can be cleaned up.  cgroup
currently provides release_agent for it; unfortunately, this mechanism
is riddled with issues.  This patchset implements a replacement
mechanism "cgroup.subtree_populated" which can be used to monitor
whether the cgroup's subhierarchy has tasks in it or not and triggers
poll and [di]notify events when its content changes.

This patchset contains the following three patches.

 0001-kernfs-implement-kernfs_root-supers-list.patch
 0002-kernfs-make-kernfs_notify-trigger-inotify-events-too.patch
 0003-cgroup-implement-cgroup.subtree_populated-for-the-de.patch

0001-0002 add [di]notify notification to kernfs_notify().

0003 implements cgroup.subtree_populated.

This patchset is on top of "cgroup: implement unified hierarchy, v2"
patchset[1] and availalbe in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-populated

diffstat follows.

 fs/kernfs/dir.c             |    1 
 fs/kernfs/file.c            |   41 +++++++++++++++++++++++----
 fs/kernfs/kernfs-internal.h |    5 +++
 fs/kernfs/mount.c           |   11 +++++++
 include/linux/cgroup.h      |   15 ++++++++++
 include/linux/kernfs.h      |    4 ++
 kernel/cgroup.c             |   65 +++++++++++++++++++++++++++++++++++++++++---
 7 files changed, 132 insertions(+), 10 deletions(-)

Thanks.

--
tejun

[L] http://lkml.kernel.org/g/1397056052-2829-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
[1] http://lkml.kernel.org/g/1397511430-2673-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCHSET cgroup/for-3.16] cgroup: implement cgroup.populated
@ 2014-04-09 15:07 Tejun Heo
       [not found] ` <1397056052-2829-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Tejun Heo @ 2014-04-09 15:07 UTC (permalink / raw)
  To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
  Cc: rlove-L7G0xEPcOZbYtjvyW6yDsg,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA, kay-tD+1rO4QERM,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	lennart-mdGvqq1h2p+GdvJs77BJ7Q, cgroups-u79uwXL29TY76Z2rM5mHXA,
	eparis-FjpueFixGhCM4zKIHC2jIg,
	john-jueV0HHMeujJJrXXpGQQMAC/G2K4zDHf

Hello,

(inotify folks, can you please review the second patch which hooks up
 kernfs_notify() with fsnotify?  It works but directly invoking
 fsnotify_parent() and fsnotify() feels a bit dirty.  Maybe something
 like fsnotify_notify_modify_by_dentry() would make more sense?)

cgroup users often need a way to determine when a cgroup's
subhierarchy becomes empty so that it can be cleaned up.  cgroup
currently provides release_agent for it; unfortunately, this mechanism
is riddled with issues.  This patchset implements a replacement
mechanism "cgroup.subtree_populated" which can be used to monitor
whether the cgroup's subhierarchy has tasks in it or not and triggers
poll and [di]notify events when its content changes.

This patchset contains the following three patches.

 0001-kernfs-implement-kernfs_root-supers-list.patch
 0002-kernfs-make-kernfs_notify-trigger-inotify-events-too.patch
 0003-cgroup-implement-cgroup.subtree_populated-for-the-de.patch

0001-0002 add [di]notify notification to kernfs_notify().

0003 implements cgroup.subtree_populated.

This patchset is on top of "cgroup: implement unified hierarchy"
patchset[1] and availalbe in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-populated

diffstat follows.

 fs/kernfs/dir.c             |    1 
 fs/kernfs/file.c            |   41 +++++++++++++++++++++++----
 fs/kernfs/kernfs-internal.h |    5 +++
 fs/kernfs/mount.c           |   11 +++++++
 include/linux/cgroup.h      |   15 ++++++++++
 include/linux/kernfs.h      |    4 ++
 kernel/cgroup.c             |   65 +++++++++++++++++++++++++++++++++++++++++---
 7 files changed, 132 insertions(+), 10 deletions(-)

--
tejun

[1] http://lkml.kernel.org/g/1395974461-12735-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-04-17  1:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 21:44 [PATCHSET cgroup/for-3.16] cgroup: implement cgroup.populated, v2 Tejun Heo
     [not found] ` <1397511846-2904-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-14 21:44   ` [PATCH 1/3] kernfs: implement kernfs_root->supers list Tejun Heo
2014-04-14 21:44   ` [PATCH 2/3] kernfs: make kernfs_notify() trigger inotify events too Tejun Heo
2014-04-14 21:44   ` [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy Tejun Heo
     [not found]     ` <1397511846-2904-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-15  0:57       ` Li Zefan
     [not found]         ` <534C83F1.9020106-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-15 14:54           ` Tejun Heo
     [not found]             ` <20140415145450.GL1863-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-04-15 16:52               ` Tejun Heo
     [not found]                 ` <20140415165221.GD30990-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-04-16  1:30                   ` Li Zefan
2014-04-16  2:48       ` Li Zefan
     [not found]         ` <534DEF62.4090900-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-04-16  3:33           ` Kay Sievers
     [not found]             ` <CAPXgP12kvPdX0QExwN2JphDfEW=d+7K2c_Y8DbomGd=YVy=VGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-16  3:50               ` Eric W. Biederman
     [not found]                 ` <87tx9uhr0j.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2014-04-16  4:15                   ` Kay Sievers
2014-04-16  4:20                   ` Li Zefan
2014-04-16  4:16               ` Li Zefan
2014-04-16 14:50       ` [PATCH v3 3/3] cgroup: implement cgroup.populated " Tejun Heo
     [not found]         ` <20140416145047.GC1257-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-04-17  1:23           ` Li Zefan
  -- strict thread matches above, loose matches on Subject: below --
2014-04-09 15:07 [PATCHSET cgroup/for-3.16] cgroup: implement cgroup.populated Tejun Heo
     [not found] ` <1397056052-2829-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-09 15:07   ` [PATCH 2/3] kernfs: make kernfs_notify() trigger inotify events too Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).