linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v2 for-6.1] kernfs, cgroup: implement kernfs_show() and cgroup_file_show()
@ 2022-08-28  5:04 Tejun Heo
  2022-08-28  5:04 ` [PATCH 1/9] kernfs: Simply by replacing kernfs_deref_open_node() with of_on() Tejun Heo
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Tejun Heo @ 2022-08-28  5:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, linux-fsdevel, Chengming Zhou, Johannes Weiner,
	Imran Khan, kernel-team

Hello,

Greg: If this looks good to you, can you apply 0001-0008 to your tree? I'll
likely have more cgroup updates on top, so I think it'd be better if I pull
your tree and then handle the cgroup part in cgroup tree.

Currently, deactivated kernfs nodes are used for two purposes - during
removal to kill and drain nodes and during creation to make multiple
kernfs_nodes creations to succeed or fail as a group.

This patchset implements kernfs_show() which can dynamically show and hide
kernfs_nodes using the [de]activation mechanisms, and, on top, implements
cgroup_file_show() which allows toggling cgroup file visiblity.

This is for the following pending patchset to allow disabling PSI on
per-cgroup basis:

 https://lore.kernel.org/all/20220808110341.15799-1-zhouchengming@bytedance.com/t/#u

which requires hiding the corresponding cgroup interface files while
disabled.

This patchset contains the following nine patches.

 0001-kernfs-Simply-by-replacing-kernfs_deref_open_node-wi.patch
 0002-kernfs-Drop-unnecessary-mutex-local-variable-initial.patch
 0003-kernfs-Refactor-kernfs_get_open_node.patch
 0004-kernfs-Skip-kernfs_drain_open_files-more-aggressivel.patch
 0005-kernfs-Improve-kernfs_drain-and-always-call-on-remov.patch
 0006-kernfs-Add-KERNFS_REMOVING-flags.patch
 0007-kernfs-Factor-out-kernfs_activate_one.patch
 0008-kernfs-Implement-kernfs_show.patch
 0009-cgroup-Implement-cgroup_file_show.patch

0001-0003 are misc prep patches. 0004-0008 implement kernsf_deactivate().
0009 implements cgroup_file_show() on top. The patches are also available in
the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git kernfs-show

The main difference from the previous version[1] is that while show/hide
still use the same mechanism as [de]activation, their states are tracked
separately so that e.g. an unrelated kernfs_activate() higher up in the tree
doesn't interfere with hidden nodes in the subtree.

diffstat follows. Thanks.

 fs/kernfs/dir.c             |  102 +++++++++++++++++++++++++++++++----------------
 fs/kernfs/file.c            |  151 +++++++++++++++++++++++++++++++++-------------------------------------
 fs/kernfs/kernfs-internal.h |    1
 include/linux/cgroup.h      |    1
 include/linux/kernfs.h      |    3 +
 kernel/cgroup/cgroup.c      |   20 +++++++++
 6 files changed, 166 insertions(+), 112 deletions(-)

--
tejun

[1] http://lkml.kernel.org/r/20220820000550.367085-1-tj@kernel.org


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

end of thread, other threads:[~2022-09-09 14:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28  5:04 [PATCHSET v2 for-6.1] kernfs, cgroup: implement kernfs_show() and cgroup_file_show() Tejun Heo
2022-08-28  5:04 ` [PATCH 1/9] kernfs: Simply by replacing kernfs_deref_open_node() with of_on() Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 2/9] kernfs: Drop unnecessary "mutex" local variable initialization Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 3/9] kernfs: Refactor kernfs_get_open_node() Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 4/9] kernfs: Skip kernfs_drain_open_files() more aggressively Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 5/9] kernfs: Improve kernfs_drain() and always call on removal Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 6/9] kernfs: Add KERNFS_REMOVING flags Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 7/9] kernfs: Factor out kernfs_activate_one() Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 8/9] kernfs: Implement kernfs_show() Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  5:04 ` [PATCH 9/9] cgroup: Implement cgroup_file_show() Tejun Heo
2022-09-09 14:00   ` [tip: sched/psi] " tip-bot2 for Tejun Heo
2022-08-28  8:33 ` [PATCHSET v2 for-6.1] kernfs, cgroup: implement kernfs_show() and cgroup_file_show() Chengming Zhou

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).