OSDN Git Service

io_uring: don't scm-account for non af_unix sockets
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 6 Apr 2022 20:33:56 +0000 (21:33 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 Apr 2022 23:34:19 +0000 (17:34 -0600)
commit1f59bc0f18cf46abe27ea18cfa4cb7f1b4166896
treea9f8211da30ada037136ec4c130517602b1b7fc0
parentb4f20bb4e6d55a971d5f5555a971978a6263d8de
io_uring: don't scm-account for non af_unix sockets

io_uring deals with file reference loops by registering all fixed files
in the SCM/GC infrastrucure. However, only a small subset of all file
types can keep long-term references to other files and those that don't
are not interesting for the garbage collector as they can't be in a
reference loop. They neither can be directly recycled by GC nor affect
loop searching.

Let's skip io_uring SCM accounting for loop-less files, i.e. all but
af_unix sockets, quite imroving fixed file updates performance and
greatly helpnig with memory footprint.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9c44ecf6e89d69130a8c4360cce2183ffc5ddd6f.1649277098.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c