Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1545243 > unrolled thread
| Started by | Tejun Heo <tj@kernel.org> |
|---|---|
| First post | 2016-12-20 17:20 +0100 |
| Last post | 2016-12-27 21:10 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 Tejun Heo <tj@kernel.org> - 2016-12-20 17:20 +0100
Re: [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 Greg KH <gregkh@linuxfoundation.org> - 2016-12-21 11:00 +0100
Re: [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 Zefan Li <lizefan@huawei.com> - 2016-12-26 07:30 +0100
Re: [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 Tejun Heo <tj@kernel.org> - 2016-12-27 21:10 +0100
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2016-12-20 17:20 +0100 |
| Subject | [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 |
| Message-ID | <sQviW-7Qa-11@gated-at.bofh.it> |
On cgroup v1, the pid listings in "cgroup.procs" and "tasks" are sorted which adds a lot of complications and overhead. v2 doesn't have such requirement and has been intentionally using a modified sorting order so that the output doesn't look sorted to users. This patchset re-implements "cgroup.procs" reading for v2 which simply keeps a css_task_iter open while the file is being read. Keeping the iterator open makes it unnecessary to skip to the right position on each read segment and associated errors - e.g. incorrectly skipping over pids because earlier pids disappeared between the reads. Using persistent iterator across multiple read calls requires ->release() callback to clean it up. kernfs operations ->open/release() are added and piped through cftype. This patchset contains the following five patches. 0001-kernfs-make-kernfs_open_file-mmapped-a-bitfield.patch 0002-kernfs-add-kernfs_ops-open-release-callbacks.patch 0003-cgroup-add-cftype-open-release-callbacks.patch 0004-cgroup-reimplement-reading-cgroup.procs-on-cgroup-v2.patch 0005-cgroup-remove-cgroup_pid_fry-and-friends.patch 0001 is a misc kernfs patch and 0002 adds ->open/release() to kernfs. 0003 pipes ->open/release() through cftype. 0004 implements the new cgroup.procs for v2 and 0005 removes the now unused sort order frying logic. Greg, would it be okay to route the kernfs patches through cgroup/for-4.11? The patches are also available in the following git branch. git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup2-procs diffstat follows. Thanks. fs/kernfs/dir.c | 2 fs/kernfs/file.c | 53 +++++++++++++++-- fs/kernfs/kernfs-internal.h | 2 include/linux/cgroup-defs.h | 3 + include/linux/kernfs.h | 12 +++- kernel/cgroup.c | 130 +++++++++++++++++++++++++++++--------------- 6 files changed, 148 insertions(+), 54 deletions(-) -- tejun
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-21 11:00 +0100 |
| Subject | Re: [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 |
| Message-ID | <sQLQK-1IF-17@gated-at.bofh.it> |
| In reply to | #1545243 |
On Tue, Dec 20, 2016 at 11:12:17AM -0500, Tejun Heo wrote: > On cgroup v1, the pid listings in "cgroup.procs" and "tasks" are > sorted which adds a lot of complications and overhead. v2 doesn't > have such requirement and has been intentionally using a modified > sorting order so that the output doesn't look sorted to users. > > This patchset re-implements "cgroup.procs" reading for v2 which simply > keeps a css_task_iter open while the file is being read. Keeping the > iterator open makes it unnecessary to skip to the right position on > each read segment and associated errors - e.g. incorrectly skipping > over pids because earlier pids disappeared between the reads. > > Using persistent iterator across multiple read calls requires > ->release() callback to clean it up. kernfs operations > ->open/release() are added and piped through cftype. > > This patchset contains the following five patches. > > 0001-kernfs-make-kernfs_open_file-mmapped-a-bitfield.patch > 0002-kernfs-add-kernfs_ops-open-release-callbacks.patch > 0003-cgroup-add-cftype-open-release-callbacks.patch > 0004-cgroup-reimplement-reading-cgroup.procs-on-cgroup-v2.patch > 0005-cgroup-remove-cgroup_pid_fry-and-friends.patch > > 0001 is a misc kernfs patch and 0002 adds ->open/release() to kernfs. > 0003 pipes ->open/release() through cftype. 0004 implements the new > cgroup.procs for v2 and 0005 removes the now unused sort order frying > logic. > > Greg, would it be okay to route the kernfs patches through > cgroup/for-4.11? No objection from me at all: Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[toc] | [prev] | [next] | [standalone]
| From | Zefan Li <lizefan@huawei.com> |
|---|---|
| Date | 2016-12-26 07:30 +0100 |
| Subject | Re: [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 |
| Message-ID | <sSwXg-YU-3@gated-at.bofh.it> |
| In reply to | #1545243 |
On 2016/12/21 0:12, Tejun Heo wrote: > On cgroup v1, the pid listings in "cgroup.procs" and "tasks" are > sorted which adds a lot of complications and overhead. v2 doesn't > have such requirement and has been intentionally using a modified > sorting order so that the output doesn't look sorted to users. > > This patchset re-implements "cgroup.procs" reading for v2 which simply > keeps a css_task_iter open while the file is being read. Keeping the > iterator open makes it unnecessary to skip to the right position on > each read segment and associated errors - e.g. incorrectly skipping > over pids because earlier pids disappeared between the reads. > > Using persistent iterator across multiple read calls requires > ->release() callback to clean it up. kernfs operations > ->open/release() are added and piped through cftype. > > This patchset contains the following five patches. > > 0001-kernfs-make-kernfs_open_file-mmapped-a-bitfield.patch > 0002-kernfs-add-kernfs_ops-open-release-callbacks.patch > 0003-cgroup-add-cftype-open-release-callbacks.patch > 0004-cgroup-reimplement-reading-cgroup.procs-on-cgroup-v2.patch > 0005-cgroup-remove-cgroup_pid_fry-and-friends.patch > > 0001 is a misc kernfs patch and 0002 adds ->open/release() to kernfs. > 0003 pipes ->open/release() through cftype. 0004 implements the new > cgroup.procs for v2 and 0005 removes the now unused sort order frying > logic. > > Greg, would it be okay to route the kernfs patches through > cgroup/for-4.11? > > The patches are also available in the following git branch. > > git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup2-procs > > diffstat follows. Thanks. > > fs/kernfs/dir.c | 2 > fs/kernfs/file.c | 53 +++++++++++++++-- > fs/kernfs/kernfs-internal.h | 2 > include/linux/cgroup-defs.h | 3 + > include/linux/kernfs.h | 12 +++- > kernel/cgroup.c | 130 +++++++++++++++++++++++++++++--------------- > 6 files changed, 148 insertions(+), 54 deletions(-) > Acked-by: Zefan Li <lizefan@huawei.com>
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2016-12-27 21:10 +0100 |
| Subject | Re: [PATCHSET] kernfs, cgroup: reimplement "cgroup.procs" reading for v2 |
| Message-ID | <sT6el-6EK-1@gated-at.bofh.it> |
| In reply to | #1545243 |
On Tue, Dec 20, 2016 at 11:12:17AM -0500, Tejun Heo wrote: > On cgroup v1, the pid listings in "cgroup.procs" and "tasks" are > sorted which adds a lot of complications and overhead. v2 doesn't > have such requirement and has been intentionally using a modified > sorting order so that the output doesn't look sorted to users. > > This patchset re-implements "cgroup.procs" reading for v2 which simply > keeps a css_task_iter open while the file is being read. Keeping the > iterator open makes it unnecessary to skip to the right position on > each read segment and associated errors - e.g. incorrectly skipping > over pids because earlier pids disappeared between the reads. > > Using persistent iterator across multiple read calls requires > ->release() callback to clean it up. kernfs operations > ->open/release() are added and piped through cftype. Applied to cgroup/for-4.11. -- tejun
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web