Re: [PATCH v2 00/13] optimise registered buffer/file updates

From: Jens Axboe
Date: Tue Apr 04 2023 - 11:30:36 EST


On 4/4/23 6:39?AM, Pavel Begunkov wrote:
> The patchset optimises registered files and buffers updates / removals,
> The rsrc-update-bench test showes 11x improvement (1040K -> 11468K
> updates / sec). It also improves latency by eliminating rcu grace
> period waiting and bouncing it to another worker, and reduces
> memory footprint by removing percpu refs.
>
> That's quite important for apps updating files/buffers with medium or
> higher frequency as updates are slow and expensive, and it currently
> takes quite a number of IO requests per update to make using fixed
> files/buffers worthwhile.
>
> Another upside is that it makes it simpler, patch 9 removes very
> convoluted synchronisation via flush_delayed_work() from the quiesce
> path.

Ran this on the big box. Stock kernel is 6.3-rc5 + for-6.4/io_uring, and
patched is same kernel with this patchset applied.

Test Kernel Ops
---------------------------------------------------------
CPU0 rsrc-update-bench Stock 165670
CPU0 rsrc-update-bench Stock 166412
rsrc-update-bench Stock 213411
rsrc-update-bench Stock 208995

CPU0 rsrc-update-bench Patched 10890297
CPU0 rsrc-update-bench Patched 10451699
rsrc-update-bench Patched 10793148
rsrc-update-bench Patched 10934918

which is just ridicolous. It's ~64x faster pinned, and ~51x faster not
pinned.

On top of that, it's a nice cleanup too and reduction in complexity.

--
Jens Axboe