From: Pavel Emelyanov <xemul-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
To: Cyrill Gorcunov
<gorcunov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>
Cc: Linux FS Devel
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
Andrew Morton
<akpm-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Andrew Vagin <avagin-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>,
Michael Kerrisk
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Kirill Kolyshkin <kir-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
Jason Baron <jbaron-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>,
Andrey Vagin <avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll target files
Date: Wed, 22 Feb 2017 10:44:07 +0300 [thread overview]
Message-ID: <58AD4147.20801@virtuozzo.com> (raw)
In-Reply-To: <20170221191655.GC27653@uranus>
On 02/21/2017 10:16 PM, Cyrill Gorcunov wrote:
> On Tue, Feb 21, 2017 at 10:41:12AM -0800, Andy Lutomirski wrote:
>>> 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).
>>
>> I have no problem with this, but I'm wondering whether kcmp's ordered
>> comparisons could also be used for this purpose.
>
> Yes it can, but it would increas number of kcmp calls signisicantly.
Actually it shouldn't. If you extend the kcmp argument to accept the
epollfd:epollslot pair, this would be effectively the same as if you
had all your epoll-ed files injected into your fdtable with "strange"
fd numbers. We already have two-level rbtree for this in criu, adding
extended ("strange") fd to it should be OK.
> Look, here is how we build files tree in criu: we take inode^sdev^pos
> as a primary key and remember it inside rbtree while we're dumping files
> (note also that we don't keep files opened but rather dump them in
> chunks). Then once we find that two files have same primary key
> we use kcmp to build subtree. This really helps a lot. And I plan
> to do the same with target files from epolls:
>
> - they gonna be handled after all opened files of all processes
> in container (or children processes if dumping single task),
> thus the complete tree with primary key already will be built
>
> - on every target file I calculate primary key and then using
> kcmp will find if file is exactly one matching
> .
>
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Emelyanov <xemul@virtuozzo.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
Andy Lutomirski <luto@amacapital.net>
Cc: Linux FS Devel <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux API <linux-api@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linuxfoundation.org>,
Andrew Vagin <avagin@virtuozzo.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Kirill Kolyshkin <kir@openvz.org>,
Jason Baron <jbaron@akamai.com>, Andrey Vagin <avagin@openvz.org>
Subject: Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll target files
Date: Wed, 22 Feb 2017 10:44:07 +0300 [thread overview]
Message-ID: <58AD4147.20801@virtuozzo.com> (raw)
In-Reply-To: <20170221191655.GC27653@uranus>
On 02/21/2017 10:16 PM, Cyrill Gorcunov wrote:
> On Tue, Feb 21, 2017 at 10:41:12AM -0800, Andy Lutomirski wrote:
>>> 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).
>>
>> I have no problem with this, but I'm wondering whether kcmp's ordered
>> comparisons could also be used for this purpose.
>
> Yes it can, but it would increas number of kcmp calls signisicantly.
Actually it shouldn't. If you extend the kcmp argument to accept the
epollfd:epollslot pair, this would be effectively the same as if you
had all your epoll-ed files injected into your fdtable with "strange"
fd numbers. We already have two-level rbtree for this in criu, adding
extended ("strange") fd to it should be OK.
> Look, here is how we build files tree in criu: we take inode^sdev^pos
> as a primary key and remember it inside rbtree while we're dumping files
> (note also that we don't keep files opened but rather dump them in
> chunks). Then once we find that two files have same primary key
> we use kcmp to build subtree. This really helps a lot. And I plan
> to do the same with target files from epolls:
>
> - they gonna be handled after all opened files of all processes
> in container (or children processes if dumping single task),
> thus the complete tree with primary key already will be built
>
> - on every target file I calculate primary key and then using
> kcmp will find if file is exactly one matching
> .
>
next prev parent reply other threads:[~2017-02-22 7:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 16:59 [RFC 1/3] procfs: fdinfo -- Extend information about epoll target files Cyrill Gorcunov
2017-02-21 16:59 ` Cyrill Gorcunov
[not found] ` <20170221171254.954209904-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2017-02-21 18:41 ` Andy Lutomirski
2017-02-21 18:41 ` Andy Lutomirski
2017-02-21 19:16 ` Cyrill Gorcunov
2017-02-22 7:44 ` Pavel Emelyanov [this message]
2017-02-22 7:44 ` Pavel Emelyanov
[not found] ` <58AD4147.20801-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
2017-02-22 7:54 ` Cyrill Gorcunov
2017-02-22 7:54 ` Cyrill Gorcunov
2017-02-22 8:09 ` Pavel Emelyanov
[not found] ` <58AD4733.5060304-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
2017-02-22 8:18 ` Cyrill Gorcunov
2017-02-22 8:18 ` Cyrill Gorcunov
2017-02-22 8:29 ` Pavel Emelyanov
[not found] ` <58AD4BE3.2080803-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
2017-02-22 8:35 ` Cyrill Gorcunov
2017-02-22 8:35 ` Cyrill Gorcunov
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=58AD4147.20801@virtuozzo.com \
--to=xemul-5hdwgun5lf+gspxsjd1c4w@public.gmane.org \
--cc=akpm-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=avagin-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org \
--cc=avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=gorcunov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jbaron-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org \
--cc=kir-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.