Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1585635

Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll target files

From Cyrill Gorcunov <gorcunov@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll target files
Date 2017-02-21 20:20 +0100
Message-ID <tdo8G-6Sm-13@gated-at.bofh.it> (permalink)
References <tdmgx-5z4-1@gated-at.bofh.it> <tdnFD-6qe-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 1/3] procfs: fdinfo -- Extend information about epoll target files Cyrill Gorcunov <gorcunov@openvz.org> - 2017-02-21 18:20 +0100
  Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll target files Andy Lutomirski <luto@amacapital.net> - 2017-02-21 19:50 +0100
    Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll  target files Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-21 20:20 +0100
      Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll  target files Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-22 09:00 +0100
        Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll  target files Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-22 09:20 +0100
          Re: [RFC 1/3] procfs: fdinfo -- Extend information about epoll  target files Cyrill Gorcunov <gorcunov@gmail.com> - 2017-02-22 09:40 +0100

csiph-web