]> 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)
commit5d7b7216b73ea247a27613737dada02c85de5456
tree9e086f771c7c0a799c1545a48a5995526edd5b29
parent2a917ce3fb95687bf388e00e1035f58b02b7884e
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