Files
Jeff Moyer 8453523cd8 io_uring: get rid of alloc cache init_once handling
JIRA: https://issues.redhat.com/browse/RHEL-105612
Conflicts: io_uring_cmd_init_once() doesn't actually exist in the
tree.  It was apparently added in merge commit a312e1706ce6c ("Merge
tag 'for-6.14/io_uring-20250119' of git://git.kernel.dk/linux").  The
result of this backport should match the state of the tree after that
merge.

commit fa3595523d72d13508befd28cf2ca642cafc69f7
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed Jan 22 20:00:57 2025 -0700

    io_uring: get rid of alloc cache init_once handling
    
    init_once is called when an object doesn't come from the cache, and
    hence needs initial clearing of certain members. While the whole
    struct could get cleared by memset() in that case, a few of the cache
    members are large enough that this may cause unnecessary overhead if
    the caches used aren't large enough to satisfy the workload. For those
    cases, some churn of kmalloc+kfree is to be expected.
    
    Ensure that the 3 users that need clearing put the members they need
    cleared at the start of the struct, and wrap the rest of the struct in
    a struct group so the offset is known.
    
    While at it, improve the interaction with KASAN such that when/if
    KASAN writes to members inside the struct that should be retained over
    caching, it won't trip over itself. For rw and net, the retaining of
    the iovec over caching is disabled if KASAN is enabled. A helper will
    free and clear those members in that case.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
2025-10-27 13:08:30 -04:00
..