Commit Graph

16 Commits

Author SHA1 Message Date
Jeff Moyer 0c4716a69b io_uring: fix warnings on shadow variables
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit 1da2f311ba53a1ee106a637cf17aba05d2acc1ff
Author: Jens Axboe <axboe@kernel.dk>
Date:   Fri Mar 29 17:19:45 2024 -0600

    io_uring: fix warnings on shadow variables
    
    There are a few of those:
    
    io_uring/fdinfo.c:170:16: warning: declaration shadows a local variable [-Wshadow]
      170 |                 struct file *f = io_file_from_index(&ctx->file_table, i);
          |                              ^
    io_uring/fdinfo.c:53:67: note: previous declaration is here
       53 | __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
          |                                                                   ^
    io_uring/cancel.c:187:25: warning: declaration shadows a local variable [-Wshadow]
      187 |                 struct io_uring_task *tctx = node->task->io_uring;
          |                                       ^
    io_uring/cancel.c:166:31: note: previous declaration is here
      166 |                              struct io_uring_task *tctx,
          |                                                    ^
    io_uring/register.c:371:25: warning: declaration shadows a local variable [-Wshadow]
      371 |                 struct io_uring_task *tctx = node->task->io_uring;
          |                                       ^
    io_uring/register.c:312:24: note: previous declaration is here
      312 |         struct io_uring_task *tctx = NULL;
          |                               ^
    
    and a simple cleanup gets rid of them. For the fdinfo case, make a
    distinction between the file being passed in (for the ring), and the
    registered files we iterate. For the other two cases, just get rid of
    shadowed variable, there's no reason to have a new one.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 17:10:44 -05:00
Jeff Moyer 5b0d50054c io_uring: Fix sqpoll utilization check racing with dying sqpoll
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit 606559dc4fa36a954a51fbf1c6c0cc320f551fe0
Author: Gabriel Krisman Bertazi <krisman@suse.de>
Date:   Fri Mar 8 19:32:56 2024 -0500

    io_uring: Fix sqpoll utilization check racing with dying sqpoll
    
    Commit 3fcb9d17206e ("io_uring/sqpoll: statistics of the true
    utilization of sq threads"), currently in Jens for-next branch, peeks at
    io_sq_data->thread to report utilization statistics. But, If
    io_uring_show_fdinfo races with sqpoll terminating, even though we hold
    the ctx lock, sqd->thread might be NULL and we hit the Oops below.
    
    Note that we could technically just protect the getrusage() call and the
    sq total/work time calculations.  But showing some sq
    information (pid/cpu) and not other information (utilization) is more
    confusing than not reporting anything, IMO.  So let's hide it all if we
    happen to race with a dying sqpoll.
    
    This can be triggered consistently in my vm setup running
    sqpoll-cancel-hang.t in a loop.
    
    BUG: kernel NULL pointer dereference, address: 00000000000007b0
    PGD 0 P4D 0
    Oops: 0000 [#1] PREEMPT SMP NOPTI
    CPU: 0 PID: 16587 Comm: systemd-coredum Not tainted 6.8.0-rc3-g3fcb9d17206e-dirty #69
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 2/2/2022
    RIP: 0010:getrusage+0x21/0x3e0
    Code: 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 d1 48 89 e5 41 57 41 56 41 55 41 54 49 89 fe 41 52 53 48 89 d3 48 83 ec 30 <4c> 8b a7 b0 07 00 00 48 8d 7a 08 65 48 8b 04 25 28 00 00 00 48 89
    RSP: 0018:ffffa166c671bb80 EFLAGS: 00010282
    RAX: 00000000000040ca RBX: ffffa166c671bc60 RCX: ffffa166c671bc60
    RDX: ffffa166c671bc60 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: ffffa166c671bbe0 R08: ffff9448cc3930c0 R09: 0000000000000000
    R10: ffffa166c671bd50 R11: ffffffff9ee89260 R12: 0000000000000000
    R13: ffff9448ce099480 R14: 0000000000000000 R15: ffff9448cff5b000
    FS:  00007f786e225900(0000) GS:ffff94493bc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00000000000007b0 CR3: 000000010d39c000 CR4: 0000000000750ef0
    PKRU: 55555554
    Call Trace:
     <TASK>
     ? __die_body+0x1a/0x60
     ? page_fault_oops+0x154/0x440
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? do_user_addr_fault+0x174/0x7c0
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? exc_page_fault+0x63/0x140
     ? asm_exc_page_fault+0x22/0x30
     ? getrusage+0x21/0x3e0
     ? seq_printf+0x4e/0x70
     io_uring_show_fdinfo+0x9db/0xa10
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? vsnprintf+0x101/0x4d0
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? seq_vprintf+0x34/0x50
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? seq_printf+0x4e/0x70
     ? seq_show+0x16b/0x1d0
     ? __pfx_io_uring_show_fdinfo+0x10/0x10
     seq_show+0x16b/0x1d0
     seq_read_iter+0xd7/0x440
     seq_read+0x102/0x140
     vfs_read+0xae/0x320
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? __do_sys_newfstat+0x35/0x60
     ksys_read+0xa5/0xe0
     do_syscall_64+0x50/0x110
     entry_SYSCALL_64_after_hwframe+0x6e/0x76
    RIP: 0033:0x7f786ec1db4d
    Code: e8 46 e3 01 00 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 80 3d d9 ce 0e 00 00 74 17 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 5b c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec
    RSP: 002b:00007ffcb361a4b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
    RAX: ffffffffffffffda RBX: 000055a4c8fe42f0 RCX: 00007f786ec1db4d
    RDX: 0000000000000400 RSI: 000055a4c8fe48a0 RDI: 0000000000000006
    RBP: 00007f786ecfb0b0 R08: 00007f786ecfb2a8 R09: 0000000000000001
    R10: 0000000000000000 R11: 0000000000000246 R12: 00007f786ecfaf60
    R13: 000055a4c8fe42f0 R14: 0000000000000000 R15: 00007ffcb361a628
     </TASK>
    Modules linked in:
    CR2: 00000000000007b0
    ---[ end trace 0000000000000000 ]---
    RIP: 0010:getrusage+0x21/0x3e0
    Code: 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 d1 48 89 e5 41 57 41 56 41 55 41 54 49 89 fe 41 52 53 48 89 d3 48 83 ec 30 <4c> 8b a7 b0 07 00 00 48 8d 7a 08 65 48 8b 04 25 28 00 00 00 48 89
    RSP: 0018:ffffa166c671bb80 EFLAGS: 00010282
    RAX: 00000000000040ca RBX: ffffa166c671bc60 RCX: ffffa166c671bc60
    RDX: ffffa166c671bc60 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: ffffa166c671bbe0 R08: ffff9448cc3930c0 R09: 0000000000000000
    R10: ffffa166c671bd50 R11: ffffffff9ee89260 R12: 0000000000000000
    R13: ffff9448ce099480 R14: 0000000000000000 R15: ffff9448cff5b000
    FS:  00007f786e225900(0000) GS:ffff94493bc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00000000000007b0 CR3: 000000010d39c000 CR4: 0000000000750ef0
    PKRU: 55555554
    Kernel panic - not syncing: Fatal exception
    Kernel Offset: 0x1ce00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
    
    Fixes: 3fcb9d17206e ("io_uring/sqpoll: statistics of the true utilization of sq threads")
    Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
    Link: https://lore.kernel.org/r/20240309003256.358-1-krisman@suse.de
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 15:57:44 -05:00
Jeff Moyer 035321680d io_uring/sqpoll: statistics of the true utilization of sq threads
JIRA: https://issues.redhat.com/browse/RHEL-64867

commit 3fcb9d17206e31630f802a3ab52081d1342b8ed9
Author: Xiaobing Li <xiaobing.li@samsung.com>
Date:   Wed Feb 28 17:12:51 2024 +0800

    io_uring/sqpoll: statistics of the true utilization of sq threads
    
    Count the running time and actual IO processing time of the sqpoll
    thread, and output the statistical data to fdinfo.
    
    Variable description:
    "work_time" in the code represents the sum of the jiffies of the sq
    thread actually processing IO, that is, how many milliseconds it
    actually takes to process IO. "total_time" represents the total time
    that the sq thread has elapsed from the beginning of the loop to the
    current time point, that is, how many milliseconds it has spent in
    total.
    
    The test tool is fio, and its parameters are as follows:
    [global]
    ioengine=io_uring
    direct=1
    group_reporting
    bs=128k
    norandommap=1
    randrepeat=0
    refill_buffers
    ramp_time=30s
    time_based
    runtime=1m
    clocksource=clock_gettime
    overwrite=1
    log_avg_msec=1000
    numjobs=1
    
    [disk0]
    filename=/dev/nvme0n1
    rw=read
    iodepth=16
    hipri
    sqthread_poll=1
    
    The test results are as follows:
    Every 2.0s: cat /proc/9230/fdinfo/6 | grep -E Sq
    SqMask: 0x3
    SqHead: 3197153
    SqTail: 3197153
    CachedSqHead:   3197153
    SqThread:       9231
    SqThreadCpu:    11
    SqTotalTime:    18099614
    SqWorkTime:     16748316
    
    The test results corresponding to different iodepths are as follows:
    |-----------|-------|-------|-------|------|-------|
    |   iodepth |   1   |   4   |   8   |  16  |  64   |
    |-----------|-------|-------|-------|------|-------|
    |utilization| 2.9%  | 8.8%  | 10.9% | 92.9%| 84.4% |
    |-----------|-------|-------|-------|------|-------|
    |    idle   | 97.1% | 91.2% | 89.1% | 7.1% | 15.6% |
    |-----------|-------|-------|-------|------|-------|
    
    Signed-off-by: Xiaobing Li <xiaobing.li@samsung.com>
    Link: https://lore.kernel.org/r/20240228091251.543383-1-xiaobing.li@samsung.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-11-28 15:51:44 -05:00
Jeff Moyer fc25fecf99 io_uring/fdinfo: remove need for sqpoll lock for thread/pid retrieval
JIRA: https://issues.redhat.com/browse/RHEL-21391

commit a0d45c3f596be53c1bd8822a1984532d14fdcea9
Author: Jens Axboe <axboe@kernel.dk>
Date:   Tue Nov 14 09:55:50 2023 -0700

    io_uring/fdinfo: remove need for sqpoll lock for thread/pid retrieval
    
    A previous commit added a trylock for getting the SQPOLL thread info via
    fdinfo, but this introduced a regression where we often fail to get it if
    the thread is busy. For that case, we end up not printing the current CPU
    and PID info.
    
    Rather than rely on this lock, just print the pid we already stored in
    the io_sq_data struct, and ensure we update the current CPU every time
    we've slept or potentially rescheduled. The latter won't potentially be
    100% accurate, but that wasn't the case before either as the task can
    get migrated at any time unless it has been pinned at creation time.
    
    We retain keeping the io_sq_data dereference inside the ctx->uring_lock,
    as it has always been, as destruction of the thread and data happen below
    that. We could make this RCU safe, but there's little point in doing that.
    
    With this, we always print the last valid information we had, rather than
    have spurious outputs with missing information.
    
    Fixes: 7644b1a1c9a7 ("io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2024-02-01 12:04:14 -05:00
Jeff Moyer ee539efd20 io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid
JIRA: https://issues.redhat.com/browse/RHEL-12076
JIRA: https://issues.redhat.com/browse/RHEL-14998
CVE: CVE-2023-46862

commit 7644b1a1c9a7ae8ab99175989bfc8676055edb46
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sat Oct 21 12:30:29 2023 -0600

    io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid
    
    We could race with SQ thread exit, and if we do, we'll hit a NULL pointer
    dereference when the thread is cleared. Grab the SQPOLL data lock before
    attempting to get the task cpu and pid for fdinfo, this ensures we have a
    stable view of it.
    
    Cc: stable@vger.kernel.org
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=218032
    Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-03 15:39:16 -04:00
Jeff Moyer f99959e592 io_uring/fdinfo: only print ->sq_array[] if it's there
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit 32f5dea040ee6e3cc30ac52d23f1674fd5110d03
Author: Jens Axboe <axboe@kernel.dk>
Date:   Fri Sep 1 13:59:19 2023 -0600

    io_uring/fdinfo: only print ->sq_array[] if it's there
    
    If a ring is setup with IORING_SETUP_NO_SQARRAY, then we don't have
    the SQ array. Don't try to dump info from it through fdinfo if that
    is the case.
    
    Reported-by: syzbot+216e2ea6e0bf4a0acdd7@syzkaller.appspotmail.com
    Fixes: 2af89abda7d9 ("io_uring: add option to remove SQ indirection")
    Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 17:26:27 -04:00
Jeff Moyer 2e97dad1fe io_uring/fdinfo: get rid of ref tryget
JIRA: https://issues.redhat.com/browse/RHEL-12076

commit 3aaf22b62a9270b90524cd257755b960461a7614
Author: Jens Axboe <axboe@kernel.dk>
Date:   Mon Jul 10 13:13:54 2023 -0600

    io_uring/fdinfo: get rid of ref tryget
    
    The caller holds a reference to the ring itself, so by definition
    the ring cannot go away. There's no need to play games with tryget
    for the reference, as we don't need an extra reference at all.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-11-02 17:26:24 -04:00
Jeff Moyer 73acd4bf36 io_uring/fdinfo: include locked hash table in fdinfo output
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit ea97cbebaf861d99c3e892275147e6fca6d2c1ca
Author: Jens Axboe <axboe@kernel.dk>
Date:   Tue Jan 10 10:24:52 2023 -0700

    io_uring/fdinfo: include locked hash table in fdinfo output
    
    A previous commit split the hash table for polled requests into two
    parts, but didn't get the fdinfo output updated. This means that it's
    less useful for debugging, as we may think a given request is not pending
    poll.
    
    Fix this up by dumping the locked hash table contents too.
    
    Fixes: 9ca9fb24d5fe ("io_uring: mutex locked poll hashing")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:25:28 -04:00
Jeff Moyer f9ec50e809 io_uring: fix fdinfo sqe offsets calculation
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 00927931cb630bbf8edb6d7f4dadb25139fc5e16
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Tue Oct 11 01:59:57 2022 +0100

    io_uring: fix fdinfo sqe offsets calculation
    
    Only with the big sqe feature they take 128 bytes per entry, but we
    unconditionally advance by 128B. Fix it by using sq_shift.
    
    Fixes: 3b8fdd1dc35e3 ("io_uring/fdinfo: fix sqe dumping for IORING_SETUP_SQE128")
    Reported-and-tested-by: syzbot+e5198737e8a2d23d958c@syzkaller.appspotmail.com
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/8b41287cb75d5efb8fcb5cccde845ddbbadd8372.1665449983.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:24:09 -04:00
Jeff Moyer 65d863dfa3 io_uring/fdinfo: fix sqe dumping for IORING_SETUP_SQE128
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 3b8fdd1dc35e395d19efbc8391a809a5b954ecf4
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sun Sep 11 06:40:37 2022 -0600

    io_uring/fdinfo: fix sqe dumping for IORING_SETUP_SQE128
    
    If we have doubly sized SQEs, then we need to shift the sq index by 1
    to account for using two entries for a single request. The CQE dumping
    gets this right, but the SQE one does not.
    
    Improve the SQE dumping in general, the information dumped is pretty
    sparse and doesn't even cover the whole basic part of the SQE. Include
    information on the extended part of the SQE, if doubly sized SQEs are
    in use. A typical dump now looks like the following:
    
    [...]
    SQEs:   32
       32: opcode:URING_CMD, fd:0, flags:1, off:3225964160, addr:0x0, rw_flags:0x0, buf_index:0 user_data:2721, e0:0x0, e1:0xffffb8041000, e2:0x100000000000, e3:0x5500, e4:0x7, e5:0x0, e6:0x0, e7:0x0
       33: opcode:URING_CMD, fd:0, flags:1, off:3225964160, addr:0x0, rw_flags:0x0, buf_index:0 user_data:2722, e0:0x0, e1:0xffffb8043000, e2:0x100000000000, e3:0x5508, e4:0x7, e5:0x0, e6:0x0, e7:0x0
       34: opcode:URING_CMD, fd:0, flags:1, off:3225964160, addr:0x0, rw_flags:0x0, buf_index:0 user_data:2723, e0:0x0, e1:0xffffb8045000, e2:0x100000000000, e3:0x5510, e4:0x7, e5:0x0, e6:0x0, e7:0x0
    [...]
    
    Fixes: ebdeb7c01d02 ("io_uring: add support for 128-byte SQEs")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:23:54 -04:00
Jeff Moyer aa9bd3e8c9 io_uring/fdinfo: get rid of unnecessary is_cqe32 variable
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 4f731705cc1f1591e15e1c3133de8ae3843c68ff
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sun Sep 11 06:36:09 2022 -0600

    io_uring/fdinfo: get rid of unnecessary is_cqe32 variable
    
    We already have the cq_shift, just use that to tell if we have doubly
    sized CQEs or not.
    
    While in there, cleanup the CQE32 vs normal CQE size printing.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-05-05 15:23:54 -04:00
Jeff Moyer e61677c1ff io_uring: move a few private types to local headers
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit ad163a7e2562230c77102c60f668bac440e60cce
Author: Jens Axboe <axboe@kernel.dk>
Date:   Sat Jun 18 19:44:33 2022 -0600

    io_uring: move a few private types to local headers
    
    Commit 3a3d47fa9cfd ("io_uring: make io_uring_types.h public") moved
    a bunch of io_uring types to a kernel wide header, so we could make
    tracing a bit saner rather than pass in a ton of arguments.
    
    However, there are a few types in there that are not really needed to
    be system wide. Move the cancel data and mapped buffers back to the
    appropriate io_uring local headers.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:22:02 -04:00
Jeff Moyer 8034d812f4 io_uring: kill extra io_uring_types.h includes
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 27a9d66fec77cff0e32d2ecd5d0ac7ef878a7bb0
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Jun 16 13:57:18 2022 +0100

    io_uring: kill extra io_uring_types.h includes
    
    io_uring/io_uring.h already includes io_uring_types.h, no need to
    include it every time. Kill it in a bunch of places, it prepares us for
    following patches.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/94d8c943fbe0ef949981c508ddcee7fc1c18850f.1655384063.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:19:02 -04:00
Jeff Moyer 64fd170b52 io_uring: introduce a struct for hash table
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit e6f89be61410ff5a0e690d87d7a308e81f0f5a71
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Thu Jun 16 10:22:10 2022 +0100

    io_uring: introduce a struct for hash table
    
    Instead of passing around a pointer to hash buckets, add a bit of type
    safety and wrap it into a structure.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/d65bc3faba537ec2aca9eabf334394936d44bd28.1655371007.git.asml.silence@gmail.com
    Reviewed-by: Hao Xu <howeyxu@tencent.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:09:02 -04:00
Jeff Moyer 356f3e0a36 io_uring: switch cancel_hash to use per entry spinlock
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 38513c464d3d45b4088c82f6e42d9cdbc5ee57e6
Author: Hao Xu <howeyxu@tencent.com>
Date:   Thu Jun 16 10:22:02 2022 +0100

    io_uring: switch cancel_hash to use per entry spinlock
    
    Add a new io_hash_bucket structure so that each bucket in cancel_hash
    has separate spinlock. Use per entry lock for cancel_hash, this removes
    some completion lock invocation and remove contension between different
    cancel_hash entries.
    
    Signed-off-by: Hao Xu <howeyxu@tencent.com>
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/05d1e135b0c8bce9d1441e6346776589e5783e26.1655371007.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 06:01:02 -04:00
Jeff Moyer affb40be46 io_uring: move fdinfo helpers to its own file
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit a4ad4f748ea96202451f88b6385d7283d0f2e513
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed May 25 10:40:19 2022 -0600

    io_uring: move fdinfo helpers to its own file
    
    This also means moving a bit more of the fixed file handling to the
    filetable side, which makes sense separately too.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2023-04-29 05:32:02 -04:00