bcachefs: Avoid atomics in write fast path
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 2 Nov 2019 01:16:51 +0000 (21:16 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:31 +0000 (17:08 -0400)
commitf8f30863382c0d905196ea7606c14524d1f21fd0
treeec911c3eb1a12c6c309661214250cb03e6e4db4e
parentf7f63211a4e7ecc4c56e3bc1062a4f9711dfd0aa
bcachefs: Avoid atomics in write fast path

This adds some horrible hacks, but the atomic ops for closures were
getting to be a pretty expensive part of the write path. We don't want
to rip out closures entirely from the write path, because they're used
for e.g. waiting on the allocator, or waiting on the journal flush, and
that stuff would get really ugly without closures.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c
fs/bcachefs/io.c
fs/bcachefs/io.h
fs/bcachefs/io_types.h