Re: [PATCH] mm: move more expensive part of XA setup out of mapping check

From: Matthew Wilcox
Date: Tue Oct 26 2021 - 14:09:37 EST


On Tue, Oct 26, 2021 at 10:01:20AM -0600, Jens Axboe wrote:
> The fast path here is not needing any writeback, yet we spend time setting
> up the xarray lookup data upfront. Move the part that actually needs to
> iterate the address space mapping into a separate helper, saving ~30% of
> the time here.

No objection to this patch, but it did remind me that I never saw an answer to
https://lore.kernel.org/all/CAHk-=wg_-EwefQ_3Osz4iJxTrTk3tfrV53Z7-jaGg=tm9i5TXg@xxxxxxxxxxxxxx/
(and nor did lore)