From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Andrei Vagin <avagin@virtuozzo.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-api@vger.kernel.org, viro@zeniv.linux.org.uk,
akpm@linuxfoundation.org, xemul@virtuozzo.com,
mtk.manpages@gmail.com, kir@openvz.org,
Andrey Vagin <avagin@openvz.org>, Jason Baron <jbaron@akamai.com>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [patch 1/3] procfs: fdinfo -- Extend information about epoll target files
Date: Fri, 17 Mar 2017 11:26:20 +0300 [thread overview]
Message-ID: <20170317082620.GA29364@uranus.lan> (raw)
In-Reply-To: <20170317045908.GA4509@outlook.office365.com>
On Thu, Mar 16, 2017 at 09:59:09PM -0700, Andrei Vagin wrote:
> On Fri, Mar 10, 2017 at 11:16:56AM +0300, Cyrill Gorcunov wrote:
> > Since it is possbile to have same number in tfd field (say
> > file added, closed, then nother file dup'ed to same number
> > and added back) it is imposible to distinguish such target
> > files solely by their numbers.
> >
> > Strictly speaking regular applications don't need to recognize
> > these targets at all but for checkpoint/restore sake we need
> > to collect targets to be able to push them back on restore
> > stage in a proper order.
> >
> > Thus lets add file position, inode and device number where
> > this target lays. This three fields can be used as a primary
> > key for sorting, and together with kcmp help CRIU can find
> > out an exact file target (from the whole set of processes
> > being checkpointed).
> >
> > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> > CC: Al Viro <viro@zeniv.linux.org.uk>
> > CC: Andrew Morton <akpm@linuxfoundation.org>
> > CC: Andrey Vagin <avagin@openvz.org>
> > CC: Pavel Emelyanov <xemul@virtuozzo.com>
> > CC: Michael Kerrisk <mtk.manpages@gmail.com>
> > CC: Kir Kolyshkin <kir@openvz.org>
> > CC: Jason Baron <jbaron@akamai.com>
> > CC: Andy Lutomirski <luto@amacapital.net>
> > ---
> > Documentation/filesystems/proc.txt | 6 +++++-
> > fs/eventpoll.c | 8 ++++++--
> > 2 files changed, 11 insertions(+), 3 deletions(-)
> >
> > Index: linux-ml.git/Documentation/filesystems/proc.txt
> > ===================================================================
> > --- linux-ml.git.orig/Documentation/filesystems/proc.txt
> > +++ linux-ml.git/Documentation/filesystems/proc.txt
> > @@ -1779,12 +1779,16 @@ pair provide additional information part
> > pos: 0
> > flags: 02
> > mnt_id: 9
> > - tfd: 5 events: 1d data: ffffffffffffffff
> > + tfd: 5 events: 1d data: ffffffffffffffff pos:0 ino:61af sdev:7
>
> I think it may be better to print mnt_id instead of sdev, because there
> may be two file descriptors opened from different bind mounts.
Fetching mnt_id is not that cheap in compare with sdev: instead of
straight dereference inode->i_sb->s_dev we will have to figure out
mnt_id from file+path, and our primary key is from sdev+ino anyway,
so until _really_ needed I prefer cheaper/simplier solution.
prev parent reply other threads:[~2017-03-17 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 8:16 [patch 1/3] procfs: fdinfo -- Extend information about epoll target files Cyrill Gorcunov
[not found] ` <20170310082146.041584651-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2017-03-17 4:59 ` Andrei Vagin
2017-03-17 8:26 ` Cyrill Gorcunov [this message]
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=20170317082620.GA29364@uranus.lan \
--to=gorcunov@gmail.com \
--cc=akpm@linuxfoundation.org \
--cc=avagin@openvz.org \
--cc=avagin@virtuozzo.com \
--cc=jbaron@akamai.com \
--cc=kir@openvz.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mtk.manpages@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@virtuozzo.com \
/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;
as well as URLs for NNTP newsgroup(s).