diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-09-07 01:24:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 02:27:29 +0200 |
commit | ab1b597ee0e4208a1db227bb7b2c9512c8234b48 (patch) | |
tree | 57d44937a91ae2e91e4c8bf741e6e4d326933064 /README | |
parent | mm/vmalloc.c: halve the number of comparisons performed in pcpu_get_vm_areas() (diff) | |
download | linux-ab1b597ee0e4208a1db227bb7b2c9512c8234b48.tar.xz linux-ab1b597ee0e4208a1db227bb7b2c9512c8234b48.zip |
mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups
devm_memremap_pages() records mapped ranges in pgmap_radix with an entry
per section's worth of memory (128MB). The key for each of those
entries is a section number.
This leads to false positives when devm_memremap_pages() is passed a
section-unaligned range as lookups in the misalignment fail to return
NULL. We can close this hole by using the pfn as the key for entries in
the tree. The number of entries required to describe a remapped range
is reduced by leveraging multi-order entries.
In practice this approach usually yields just one entry in the tree if
the size and starting address are of the same power-of-2 alignment.
Previously we always needed nr_entries = mapping_size / 128MB.
Link: https://lists.01.org/pipermail/linux-nvdimm/2016-August/006666.html
Link: http://lkml.kernel.org/r/150215410565.39310.13767886055248249438.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reported-by: Toshi Kani <toshi.kani@hpe.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions