aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/multiorder.c
diff options
context:
space:
mode:
authorJohannes Weiner <[email protected]>2016-12-13 00:43:41 +0000
committerLinus Torvalds <[email protected]>2016-12-13 02:55:08 +0000
commitf7942430e40f14c6d2ca48a1875add509938c07d (patch)
tree8c363206d1f107bd86513597a027184ff7ae544a /tools/testing/radix-tree/multiorder.c
parentmm: workingset: turn shadow node shrinker bugs into warnings (diff)
downloadkernel-f7942430e40f14c6d2ca48a1875add509938c07d.tar.gz
kernel-f7942430e40f14c6d2ca48a1875add509938c07d.zip
lib: radix-tree: native accounting of exceptional entries
The way the page cache is sneaking shadow entries of evicted pages into the radix tree past the node entry accounting and tracking them manually in the upper bits of node->count is fraught with problems. These shadow entries are marked in the tree as exceptional entries, which are a native concept to the radix tree. Maintain an explicit counter of exceptional entries in the radix tree node. Subsequent patches will switch shadow entry tracking over to that counter. DAX and shmem are the other users of exceptional entries. Since slot replacements that change the entry type from regular to exceptional must now be accounted, introduce a __radix_tree_replace() function that does replacement and accounting, and switch DAX and shmem over. The increase in radix tree node size is temporary. A followup patch switches the shadow tracking to this new scheme and we'll no longer need the upper bits in node->count and shrink that back to one byte. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Reviewed-by: Jan Kara <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/multiorder.c')
0 files changed, 0 insertions, 0 deletions