summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2016-03-17 14:21:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 15:09:34 -0700
commite61452365372570253b2b1de84bab0cdb2e62c64 (patch)
tree85a850683646afb15f7e25d3e459eb331f1811bf /usr
parent0070e28d97e72aeac2a85f538d8a452400dfe1c7 (diff)
downloadlinux-e61452365372570253b2b1de84bab0cdb2e62c64.tar.gz
linux-e61452365372570253b2b1de84bab0cdb2e62c64.tar.bz2
linux-e61452365372570253b2b1de84bab0cdb2e62c64.zip
radix_tree: add support for multi-order entries
With huge pages, it is convenient to have the radix tree be able to return an entry that covers multiple indices. Previous attempts to deal with the problem have involved inserting N duplicate entries, which is a waste of memory and leads to problems trying to handle aliased tags, or probing the tree multiple times to find alternative entries which might cover the requested index. This approach inserts one canonical entry into the tree for a given range of indices, and may also insert other entries in order to ensure that lookups find the canonical entry. This solution only tolerates inserting powers of two that are greater than the fanout of the tree. If we wish to expand the radix tree's abilities to support large-ish pages that is less than the fanout at the penultimate level of the tree, then we would need to add one more step in lookup to ensure that any sibling nodes in the final level of the tree are dereferenced and we return the canonical entry that they reference. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions