From: Namhyung Kim <namhyung@kernel.org>
To: Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>,
Li Zefan <lizefan@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Song Liu <liu.song.a23@gmail.com>
Subject: [PATCH 0/2] cgroup: Sync cgroup id and inode number
Date: Wed, 16 Oct 2019 21:50:17 +0900 [thread overview]
Message-ID: <20191016125019.157144-1-namhyung@kernel.org> (raw)
Hello,
This patchset changes cgroup inode number and id management to be in
sync with kernfs. Currently cgroup inode is managed by kernfs while
cgroup id is allocated by its own idr. And kernfs/cgroup file handle
uses inode and generation numbers. So I added generation number to
cgroup and pass the numbers to kernfs.
The background of this work is that I want to add cgroup sampling
feature in the perf event subsystem. As Tejun mentioned that using
cgroup id is not enough and it'd better using file handle instead.
But getting file handle in perf NMI handler is not possible so I want
to get the info from a cgroup node.
The first patch added generation number to cgroup and the second patch
allows kernfs node created with external generation and inode numbers.
The patches are based on the for-next branch in Tejun's cgroup tree.
Tested with tools/testing/selftests/cgroup/test_stress.sh.
Thanks
Namhyung
Namhyung Kim (2):
cgroup: Add generation number with cgroup id
kernfs: Allow creation with external gen + ino numbers
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 +-
fs/kernfs/dir.c | 63 +++++++++++++++++------
fs/kernfs/file.c | 9 ++--
fs/kernfs/kernfs-internal.h | 5 ++
fs/sysfs/file.c | 2 +-
include/linux/cgroup-defs.h | 12 ++++-
include/linux/kernfs.h | 25 ++++++---
kernel/cgroup/cgroup.c | 70 +++++++++++++++++++-------
8 files changed, 143 insertions(+), 47 deletions(-)
--
2.23.0.700.g56cf767bdb-goog
next reply other threads:[~2019-10-16 12:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 12:50 Namhyung Kim [this message]
2019-10-16 12:50 ` [PATCH 1/2] cgroup: Add generation number with cgroup id Namhyung Kim
2019-10-24 17:44 ` Tejun Heo
2019-10-25 8:30 ` Namhyung Kim
2019-10-25 9:38 ` Namhyung Kim
2019-10-25 10:56 ` Tejun Heo
2019-10-26 11:32 ` Namhyung Kim
2019-10-25 11:06 ` Tejun Heo
2019-10-25 18:47 ` Tejun Heo
2019-10-26 11:42 ` Namhyung Kim
2019-11-01 0:47 ` Namhyung Kim
2019-10-26 11:40 ` Namhyung Kim
2019-10-16 12:50 ` [PATCH 2/2] kernfs: Allow creation with external gen + ino numbers Namhyung Kim
2019-10-24 17:52 ` Tejun Heo
2019-10-25 8:46 ` Namhyung Kim
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=20191016125019.157144-1-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.song.a23@gmail.com \
--cc=lizefan@huawei.com \
--cc=rafael@kernel.org \
--cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome