diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-01-23 15:24:46 -0700 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-01-25 17:14:44 +0100 |
commit | 2263639f96f24a121ec9f037981b81daf5a8d60a (patch) | |
tree | c5258ead4c032ef822ed3588e415cd7954beaf8a /mm | |
parent | 0000ff2523df42bcf3c2fe3e8daaeca038835487 (diff) | |
download | linux-2263639f96f24a121ec9f037981b81daf5a8d60a.tar.gz linux-2263639f96f24a121ec9f037981b81daf5a8d60a.tar.bz2 linux-2263639f96f24a121ec9f037981b81daf5a8d60a.zip |
iov_iter: streamline iovec/bvec alignment iteration
Rewrite the alignment checking iterators for iovec and bvec to be easier
to read, and also significantly more compact in terms of generated code.
This saves 270 bytes of text on x86-64 for me (with clang-18) and 224
bytes on arm64 (with gcc-13).
In profiles, also saves a bit of time as well for the same workload:
0.81% -0.18% [kernel.vmlinux] [k] iov_iter_aligned_bvec
0.48% -0.09% [kernel.vmlinux] [k] iov_iter_is_aligned
which is a nice side benefit as well.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/544b31f7-6d4b-42f5-a544-1420501f081f@kernel.dk
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
v2: do the other half of the iterators too, as suggested by Keith.
This further saves some text.
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions