Re: [RFC V2 PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

From: Shi, Yang
Date: Mon Feb 29 2016 - 13:01:00 EST


On 2/27/2016 3:51 AM, Tejun Heo wrote:
Hello,

On Sat, Feb 27, 2016 at 6:45 AM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
It can be, but we can print out the ino and userland can match that up
with path if necessary.

Wouldn't be cgroup id the better choice?

AFAIK we aren't exposing cgroup id to userland anywhere right now.
Eventually, I think the right thing to do is using the same number for
both.

Thanks for all the comments.

Since the current tracepoints print the path length too by __trace_wb_cgroup_size and __trace_wbc_cgroup_size, but we can't get the path length if we switch to group ino. So, I'm supposed I have to drop all the *_size stuff.

And, when CONFIG_CGROUP_WRITEBACK is not enabled, __trace_wb_assign_cgroup and __trace_wbc_assign_cgroup return "strcpy(buf, "/")", so to get aligned with this, I need print out the ino of "/", right? But, the ROOT_INO may vary from different filesystems.

All of them will be addressed in V4, but it may experience some delay since I have to travel this week.

Regards,
Yang


Thanks.