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, 17 Apr 2022 22:52:13 +0000 (16:52 -0600)
commit12beeef15d414db14b9edaacb3710b262b239d9a
treef3f0aedeeb279563c6a9427888eac7e7f5ac90e1
parent0af361337af27d43417cdee44cb565829837bc22
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