[CRIU] [PATCH v5 00/33] Rework file opening scheme to make it asynchronous

Kirill Tkhai ktkhai at virtuozzo.com
Mon Dec 26 06:24:34 PST 2016


Hi,

this is v5 iteration of the patchset. Below are the changes:

1)[1/33] pstree: Add task_st bit field

FDS_EVENT_BIT define was added

2)[14/33]bits: Add test_and_set_bit()

New patch added

3)[15/33]files: Implement {set,clear,wait}_fds_event()

Bit operations instead of cmpxchg are used now.
clear_fds_event() was splited from wait function.

4)[22/33]eventpoll: Make post_open stage may fail

Numeric values instead of ORV_* are used.

5)[23/33]files: Set fds event after sending fd to peer

Do not send fds event to self

6)[24/33]files: Add new_fd parameter to file_desc_ops::open()

Numeric values instead of ORV_* are used.

7)[25/33]files: Make recv_fd_from_peer() non-block

Numeric values instead of ORV_* are used.

8)[26/33]files: Kill struct file_desc_ops::post_open

Clear FDS_EVENT every beginning of cycle
Numeric values instead of ORV_* are used.

---

Kirill Tkhai (33):
      pstree: Add task_st bit field
      files: Send/receive fds with pointers on their struct fdinfo_list_entry in receiver
      files: Move closing fle's transport_fd to recv_fd_from_peer()
      files: Move derefferencing of TRANSPORT_FD_OFF to send_fd_to_peer()
      files: Add fle_init() for initialization new fdinfo_list_entry
      files: Allow to receive further fds
      files: Make sending fds to peers async
      files: Receive real fd numbers using recv_fd_from_peer()
      files: Kill file_desc_ops::want_transport()
      files: Kill fd parameter of transport_name_gen()
      files: Kill want_post_open_stage()
      files: Kill fd_open_state::receive_fd stage
      files: Merge states iteration into open_fdinfos()
      bits: Add test_and_set_bit()
      files: Implement {set,clear,wait}_fds_event()
      files: Add fdinfo_list_entry::stage
      unix: Link connected to peer sockets to its list
      unix: Wait a peer using task_st futex
      inet: Link sockets in port_type list
      inet: Use task_st futex for notification instead of per-port
      timerfd: Kill post_open stage
      eventpoll: Make post_open stage may fail
      files: Set fds event after sending fd to peer
      files: Add new_fd parameter to file_desc_ops::open()
      files: Make recv_fd_from_peer() non-block
      files: Kill struct file_desc_ops::post_open
      tty: Set dependencies between masters, slaves and ctty
      files: Move ctty fixup to open_fd()
      tty: Use generic list for tty files
      eventpoll: Use generic list for eventpoll files
      files: Kill pid parameter of open_fdinfos()
      files: Merge collect_gen_fd() and collect_used_fd(), and call it unconditionally
      tty: Optimize dependencies check


 criu/arch/aarch64/Makefile               |    2 
 criu/arch/aarch64/bitops.S               |   18 +
 criu/arch/arm/Makefile                   |    2 
 criu/arch/arm/bitops.S                   |   22 ++
 criu/autofs.c                            |   30 ++
 criu/eventfd.c                           |    5 
 criu/eventpoll.c                         |   46 +++
 criu/fifo.c                              |   10 +
 criu/files-ext.c                         |    5 
 criu/files-reg.c                         |   15 +
 criu/files.c                             |  415 +++++++++++++-----------------
 criu/fsnotify.c                          |   10 -
 criu/include/files.h                     |   42 ++-
 criu/include/pipes.h                     |    1 
 criu/include/pstree.h                    |    7 +
 criu/include/rst_info.h                  |    3 
 criu/include/sk-inet.h                   |    1 
 criu/include/tty.h                       |    2 
 criu/namespaces.c                        |    5 
 criu/pipes.c                             |   46 +--
 criu/pstree.c                            |    1 
 criu/signalfd.c                          |    5 
 criu/sk-inet.c                           |   49 +++-
 criu/sk-netlink.c                        |    5 
 criu/sk-packet.c                         |    5 
 criu/sk-unix.c                           |  125 +++++----
 criu/timerfd.c                           |   25 --
 criu/tty.c                               |  111 ++++----
 criu/tun.c                               |    9 -
 include/common/arch/aarch64/asm/bitops.h |    2 
 include/common/arch/arm/asm/bitops.h     |    2 
 include/common/arch/ppc64/asm/bitops.h   |   41 +++
 include/common/arch/x86/asm/bitops.h     |   19 +
 include/common/lock.h                    |    6 
 34 files changed, 625 insertions(+), 467 deletions(-)
 create mode 100644 criu/arch/aarch64/bitops.S
 create mode 100644 criu/arch/arm/bitops.S

--
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>


More information about the CRIU mailing list