The patch titled Subject: mm: workingset: restore refault tracking for single-page files has been added to the -mm tree. Its filename is mm-workingset-restore-refault-tracking-for-single-page-files.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-workingset-restore-refault-tracking-for-single-page-files.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-workingset-restore-refault-tracking-for-single-page-files.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Johannes Weiner <hannes@xxxxxxxxxxx> Subject: mm: workingset: restore refault tracking for single-page files Shadow entries in the page cache used to be accounted behind the radix tree implementation's back in the upper bits of node->count, and the radix tree code extending a single-entry tree with a shadow entry in root->rnode would corrupt that counter. As a result, we could not put shadow entries at index 0 if the tree didn't have any other entries, and that means no refault detection for any single-page file. Now that the shadow entries are tracked natively in the radix tree's exceptional counter, this is no longer necessary. Extending and shrinking the tree from and to single entries in root->rnode now does the right thing when the entry is exceptional, remove that limitation. Link: http://lkml.kernel.org/r/20161117193244.GF23430@xxxxxxxxxxx Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Reviewed-by: Jan Kara <jack@xxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Matthew Wilcox <mawilcox@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/filemap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff -puN mm/filemap.c~mm-workingset-restore-refault-tracking-for-single-page-files mm/filemap.c --- a/mm/filemap.c~mm-workingset-restore-refault-tracking-for-single-page-files +++ a/mm/filemap.c @@ -167,14 +167,7 @@ static void page_cache_tree_delete(struc __radix_tree_lookup(&mapping->page_tree, page->index + i, &node, &slot); - if (!node) { - VM_BUG_ON_PAGE(nr != 1, page); - /* - * We need a node to properly account shadow - * entries. Don't plant any without. XXX - */ - shadow = NULL; - } + VM_BUG_ON_PAGE(!node && nr != 1, page); radix_tree_clear_tags(&mapping->page_tree, node, slot); __radix_tree_replace(&mapping->page_tree, node, slot, shadow, _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are mm-khugepaged-close-use-after-free-race-during-shmem-collapsing.patch mm-khugepaged-fix-radix-tree-node-leak-in-shmem-collapse-error-path.patch mm-workingset-turn-shadow-node-shrinker-bugs-into-warnings.patch lib-radix-tree-native-accounting-of-exceptional-entries.patch lib-radix-tree-check-accounting-of-existing-slot-replacement-users.patch lib-radix-tree-add-entry-deletion-support-to-__radix_tree_replace.patch lib-radix-tree-update-callback-for-changing-leaf-nodes.patch mm-workingset-move-shadow-entry-tracking-to-radix-tree-exceptional-tracking.patch mm-workingset-restore-refault-tracking-for-single-page-files.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html