From: Shaohua Li <shli@fb.com>
To: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
<linux-kernel@vger.kernel.org>, <gregkh@linuxfoundation.org>,
<viro@zeniv.linux.org.uk>, <Kernel-team@fb.com>
Subject: Re: [PATCH 5/5] kernfs: add exportfs operations
Date: Wed, 24 May 2017 11:01:07 -0700 [thread overview]
Message-ID: <20170524180106.GA85439@evv-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20170524174604.GK24798@htj.duckdns.org>
On Wed, May 24, 2017 at 01:46:04PM -0400, Tejun Heo wrote:
> Hello, Christoph.
>
> On Wed, May 24, 2017 at 10:41:38AM -0700, Christoph Hellwig wrote:
> > > But how do you map that back to the cgroup without scanning the cgroup
> > > hierarchy?
> >
> > I'm totally lost on why you would do that. So maybe you just need
> > to send the full patch so that reviewers get the full picture.
>
> Here's a simple scenario. Let's say blktrace now exposes the cgroup
> inode and generation numbers per trace. Userland tool now wants to
> show that in a human readable format but it can only map back the
> inode and generation numbers to the path by scanning the cgroup tree.
> So, the goal is having a token which is not path which uniquely
> identifies a cgroup and the ability to map that back to cgroup path.
> We can add a dedicated interface to cgroup root, for example, and
> allow querying by echoing inode and generation numbers into it but
> that's kinda clumsy.
blktrace is the target I'm working on, because we can't use pid to determine
where a bio comes from, so we show an ID. Userspace tool can use the ID to find
the cgroup path. Or an BPF program can use the ID to filter trace. Regardless
how we implement the ID, it should be something like an inode number and
generation number. And since we already had existing syscall to map between
fhandle and path, I choose the exportfs operations. I'll post a full patch set
later.
Thanks,
Shaohua
next prev parent reply other threads:[~2017-05-24 18:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 22:53 [PATCH 0/5] " Shaohua Li
2017-05-22 22:53 ` [PATCH 1/5] kernfs: implement i_generation Shaohua Li
2017-05-23 7:41 ` Christoph Hellwig
2017-05-23 15:09 ` Shaohua Li
2017-05-23 19:20 ` Tejun Heo
2017-05-24 17:40 ` Christoph Hellwig
2017-05-22 22:53 ` [PATCH 2/5] kernfs: use idr instead of ida to manage inode number Shaohua Li
2017-05-22 22:53 ` [PATCH 3/5] kernfs: add an API to get kernfs node from " Shaohua Li
2017-05-22 22:53 ` [PATCH 4/5] kernfs: don't set dentry->d_fsdata Shaohua Li
2017-05-23 18:37 ` Tejun Heo
2017-05-22 22:53 ` [PATCH 5/5] kernfs: add exportfs operations Shaohua Li
2017-05-23 7:40 ` Christoph Hellwig
2017-05-23 18:57 ` Tejun Heo
2017-05-24 17:38 ` Christoph Hellwig
2017-05-24 17:39 ` Tejun Heo
2017-05-24 17:41 ` Christoph Hellwig
2017-05-24 17:46 ` Tejun Heo
2017-05-24 18:01 ` Shaohua Li [this message]
2017-05-23 18:59 ` Tejun Heo
2017-05-23 7:39 ` [PATCH 0/5] " Christoph Hellwig
2017-05-23 15:13 ` Shaohua Li
2017-05-23 19:06 ` Tejun Heo
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=20170524180106.GA85439@evv-mbp.dhcp.thefacebook.com \
--to=shli@fb.com \
--cc=Kernel-team@fb.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®