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

2016-02-29 Thread Shi, Yang
On 2/27/2016 3:51 AM, Tejun Heo wrote: Hello, On Sat, Feb 27, 2016 at 6:45 AM, Thomas Gleixner 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 anywh

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

2016-02-27 Thread Tejun Heo
Hello, On Sat, Feb 27, 2016 at 6:45 AM, Thomas Gleixner 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

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

2016-02-27 Thread Thomas Gleixner
On Sat, 27 Feb 2016, Tejun Heo wrote: > On Sat, Feb 27, 2016 at 12:37:23PM +0100, Thomas Gleixner wrote: > > On Sat, 27 Feb 2016, Tejun Heo wrote: > > > On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: > > > > Call synchronize_sched() when kernfs_node is updated since tracepoints > > > >

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

2016-02-27 Thread Tejun Heo
On Sat, Feb 27, 2016 at 12:37:23PM +0100, Thomas Gleixner wrote: > On Sat, 27 Feb 2016, Tejun Heo wrote: > > On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: > > > Call synchronize_sched() when kernfs_node is updated since tracepoints are > > > protected by rcu_read_lock_sched. > > > > Ad

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

2016-02-27 Thread Thomas Gleixner
On Sat, 27 Feb 2016, Tejun Heo wrote: > On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: > > Call synchronize_sched() when kernfs_node is updated since tracepoints are > > protected by rcu_read_lock_sched. > > Adding synchronize_sched() to operations which can be triggered from > userland

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

2016-02-27 Thread Tejun Heo
Hello, On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: > Call synchronize_sched() when kernfs_node is updated since tracepoints are > protected by rcu_read_lock_sched. Adding synchronize_sched() to operations which can be triggered from userland usually turns out to be problematic. If

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

2016-02-27 Thread Christoph Hellwig
On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: > commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback > tracepoints to report cgroup") made writeback tracepoints report cgroup > writeback, but it may trigger the below bug on -rt kernel since kernfs_path > and ker

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

2016-02-26 Thread Greg KH
On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: > commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback > tracepoints to report cgroup") made writeback tracepoints report cgroup > writeback, but it may trigger the below bug on -rt kernel since kernfs_path > and ker

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

2016-02-26 Thread Shi, Yang
On 2/26/2016 3:01 PM, Greg KH wrote: On Fri, Feb 26, 2016 at 01:47:39PM -0800, Yang Shi wrote: commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to report cgroup") made writeback tracepoints report cgroup writeback, but it may trigger the below bug on -rt

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

2016-02-26 Thread Yang Shi
commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to report cgroup") made writeback tracepoints report cgroup writeback, but it may trigger the below bug on -rt kernel since kernfs_path and kernfs_path_len are called by tracepoints, which acquire sleeping loc