• Cyrill Gorcunov's avatar
    epoll: Use epoll queues to speedup multiple duped fds · 4e8ca613
    Cyrill Gorcunov authored
    When we are dumping epoll and one of target fd is been
    duped we can reuse already collected fds rbtree to find
    proper target. We handle it in a lazy way:
    
     - try use plain regular bsearch first, in case of all
       targets are not duped we checkpoint epoll immediately
    
     - if bsearch failed we put this epoll entry into a queue
       and run its dumping later when all other files in the
       process are already dumped. At this moment fds tree
       should already has all target files in rbtree thus
       we can simply lookup for it
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    4e8ca613
cr-dump.c 39.7 KB