An error occurred fetching the project authors.
  1. 31 May, 2022 7 commits
  2. 25 May, 2022 2 commits
  3. 21 May, 2022 1 commit
    • Jens Axboe's avatar
      io_uring: cleanup handling of the two task_work lists · 3fe07bcd
      Jens Axboe authored
      Rather than pass in a bool for whether or not this work item needs to go
      into the priority list or not, provide separate helpers for it. For most
      use cases, this also then gets rid of the branch for non-priority task
      work.
      
      While at it, rename the prior_task_list to prio_task_list. Prior is
      a confusing name for it, as it would seem to indicate that this is the
      previous task_work list. prio makes it clear that this is a priority
      task_work list.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3fe07bcd
  4. 18 May, 2022 13 commits
  5. 17 May, 2022 1 commit
    • Jens Axboe's avatar
      io_uring: don't attempt to IOPOLL for MSG_RING requests · aa184e86
      Jens Axboe authored
      We gate whether to IOPOLL for a request on whether the opcode is allowed
      on a ring setup for IOPOLL and if it's got a file assigned. MSG_RING
      is the only one that allows a file yet isn't pollable, it's merely
      supported to allow communication on an IOPOLL ring, not because we can
      poll for completion of it.
      
      Put the assigned file early and clear it, so we don't attempt to poll
      for it.
      
      Reported-by: syzbot+1a0a53300ce782f8b3ad@syzkaller.appspotmail.com
      Fixes: 3f1d52ab ("io_uring: defer msg-ring file validity check until command issue")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      aa184e86
  6. 14 May, 2022 3 commits
    • Hao Xu's avatar
      io_uring: implement multishot mode for accept · 4e86a2c9
      Hao Xu authored
      Refactor io_accept() to support multishot mode.
      
      theoretical analysis:
        1) when connections come in fast
          - singleshot:
                    add accept sqe(userspace) --> accept inline
                                    ^                 |
                                    |-----------------|
          - multishot:
                   add accept sqe(userspace) --> accept inline
                                                    ^     |
                                                    |--*--|
      
          we do accept repeatedly in * place until get EAGAIN
      
        2) when connections come in at a low pressure
          similar thing like 1), we reduce a lot of userspace-kernel context
          switch and useless vfs_poll()
      
      tests:
      Did some tests, which goes in this way:
      
        server    client(multiple)
        accept    connect
        read      write
        write     read
        close     close
      
      Basically, raise up a number of clients(on same machine with server) to
      connect to the server, and then write some data to it, the server will
      write those data back to the client after it receives them, and then
      close the connection after write return. Then the client will read the
      data and then close the connection. Here I test 10000 clients connect
      one server, data size 128 bytes. And each client has a go routine for
      it, so they come to the server in short time.
      test 20 times before/after this patchset, time spent:(unit cycle, which
      is the return value of clock())
      before:
        1930136+1940725+1907981+1947601+1923812+1928226+1911087+1905897+1941075
        +1934374+1906614+1912504+1949110+1908790+1909951+1941672+1969525+1934984
        +1934226+1914385)/20.0 = 1927633.75
      after:
        1858905+1917104+1895455+1963963+1892706+1889208+1874175+1904753+1874112
        +1874985+1882706+1884642+1864694+1906508+1916150+1924250+1869060+1889506
        +1871324+1940803)/20.0 = 1894750.45
      
      (1927633.75 - 1894750.45) / 1927633.75 = 1.65%
      Signed-off-by: default avatarHao Xu <howeyxu@tencent.com>
      Link: https://lore.kernel.org/r/20220514142046.58072-5-haoxu.linux@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4e86a2c9
    • Hao Xu's avatar
      io_uring: let fast poll support multishot · dbc2564c
      Hao Xu authored
      For operations like accept, multishot is a useful feature, since we can
      reduce a number of accept sqe. Let's integrate it to fast poll, it may
      be good for other operations in the future.
      Signed-off-by: default avatarHao Xu <howeyxu@tencent.com>
      Link: https://lore.kernel.org/r/20220514142046.58072-4-haoxu.linux@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      dbc2564c
    • Hao Xu's avatar
      io_uring: add REQ_F_APOLL_MULTISHOT for requests · 227685eb
      Hao Xu authored
      Add a flag to indicate multishot mode for fast poll. currently only
      accept use it, but there may be more operations leveraging it in the
      future. Also add a mask IO_APOLL_MULTI_POLLED which stands for
      REQ_F_APOLL_MULTI | REQ_F_POLLED, to make the code short and cleaner.
      Signed-off-by: default avatarHao Xu <howeyxu@tencent.com>
      Link: https://lore.kernel.org/r/20220514142046.58072-3-haoxu.linux@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      227685eb
  7. 13 May, 2022 8 commits
  8. 11 May, 2022 1 commit
  9. 09 May, 2022 4 commits