resource: find_next_iomem_res() improvements
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 26 repliesIn review 1 of 3 applied
Patches in v1 1 of 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | resource: Fix locking in find_next_iomem_res()kernel/ | +9 | 5 replies | Applied |
| 2/3 | resource: Avoid unnecessary lookups in find_next_iomem_res()kernel/ | +22 | 0 replies | |
| 3/3 | resource: Introduce resource cachekernel/ | +49 | 10 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Dan Williams |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] resource: find_next_iomem_res() improvements
Running some microbenchmarks on dax keeps showing find_next_iomem_res() as a place in which significant amount of time is spent. It appears that in order to determine the cacheability that is required for the PTE, lookup_memtype() is called, and this one traverses the resources list in an inefficient manner. This patch-set tries to improve this situation.
The first patch fixes what appears to be unsafe locking in find_next_iomem_res().
The second patch improves performance by searching the top level first, to find a matching range, before going down to the children. The third patch improves the performance by caching the top level resource of the last found resource in find_next_iomem_res().
Both of these optimizations are based on the ranges in the top level not overlapping each other.
Running sysbench on dax (Haswell, pmem emulation, with write_cache disabled):
sysbench fileio --file-total-size=3G --file-test-mode=rndwr \ --file-io-mode=mmap --threads=4 --file-fsync-mode=fdatasync run
Provides the following results:
events (avg/stddev) -------------------
5.2-rc3: 1247669.0000/16075.39
+patches: 1293408.5000/7720.69 (+3.5%)
Nadav Amit (3):
resource: Fix locking in find_next_iomem_res()
resource: Avoid unnecessary lookups in find_next_iomem_res()
resource: Introduce resource cache
kernel/resource.c | 96 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 17 deletions(-)
Signature · 1 line
2.20.1