]> git.baikalelectronics.ru Git - kernel.git/commit
mm: move more expensive part of XA setup out of mapping check
authorJens Axboe <axboe@kernel.dk>
Fri, 5 Nov 2021 20:37:13 +0000 (13:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:34 +0000 (13:30 -0700)
commita30ca21b770b0440cca6fe4ae141b6df724da87f
tree9e086f771c7c0a799c1545a48a5995526edd5b29
parentad85d246f1f6fdc744bb2e91c1e793c7b15c6864
mm: move more expensive part of XA setup out of mapping check

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.

Link: https://lkml.kernel.org/r/49f67983-b802-8929-edab-d807f745c9ca@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c