summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-04-22 15:00:32 +0200
committerChristian Brauner <brauner@kernel.org>2026-05-11 23:12:29 +0200
commit62c251278f3bdaed72ddf980113bd8065475061f (patch)
tree1b1ea799a4529c07e5046b69fbc988666c7c5d51 /rust/kernel/alloc/kvec/errors.rs
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
parentc678577e8896829f9da08635d6075dddefbaf684 (diff)
Merge patch series "assorted ->i_count changes + extension of lockless handling"
Mateusz Guzik <mjguzik@gmail.com> says: The stock kernel support partial lockless in handling in that iput() can decrement any value > 1. Any ref acquire however requires the spinlock. With this patchset ref acquires when the value was already at least 1 also become lockless. That is, only transitions 0->1 and 1->0 take the lock. I verified when nfs calls into the hash taking the lock is typically avoided. Similarly, btrfs likes to igrab() and avoids the lock. However, I have to fully admit I did not perform any benchmarks. While cleaning stuff up I noticed lockless operation is almost readily available so I went for it. Clean-up wise, the icount_read_once() stuff lines up with inode_state_read_once(). The prefix is different but I opted to not change it due to igrab(), ihold() et al. * patches from https://patch.msgid.link/20260421182538.1215894-1-mjguzik@gmail.com: fs: allow lockless ->i_count bumps as long as it does not transition 0->1 fs: relocate and tidy up ihold() fs: add icount_read_once() and stop open-coding ->i_count loads Link: https://patch.msgid.link/20260421182538.1215894-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions