[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191016125019.157144-1-namhyung@kernel.org>
Date: Wed, 16 Oct 2019 21:50:17 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Tejun Heo <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
Li Zefan <lizefan@...wei.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Song Liu <liu.song.a23@...il.com>
Subject: [PATCH 0/2] cgroup: Sync cgroup id and inode number
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
Powered by blists - more mailing lists