lkml.org 
[lkml]   [2019]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] cgroup: Sync cgroup id and inode number
Date
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

\
 
 \ /
  Last update: 2019-10-16 14:51    [W:0.072 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site