Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1525083
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 9/9] mm: workingset: restore refault tracking for single-page files |
| Date | 2016-11-18 09:40 +0100 |
| Message-ID | <sEMSd-4GA-1@gated-at.bofh.it> (permalink) |
| References | <sEAo1-4ON-15@gated-at.bofh.it> <sEAHp-4VW-65@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 17-11-16 14:32:44, Johannes Weiner wrote:
> 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.
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> mm/filemap.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 7d92032277ff..ae7b6992aded 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -164,14 +164,7 @@ static void page_cache_tree_delete(struct address_space *mapping,
> __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,
> --
> 2.10.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/9] mm: workingset: radix tree subtleties & single-page file refaults v3 Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:20 +0100
[PATCH 4/9] lib: radix-tree: native accounting of exceptional entries Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:40 +0100
Re: [PATCH 4/9] lib: radix-tree: native accounting of exceptional entries Jan Kara <jack@suse.cz> - 2016-11-18 08:40 +0100
[PATCH 6/9] lib: radix-tree: add entry deletion support to __radix_tree_replace() Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:40 +0100
Re: [PATCH 6/9] lib: radix-tree: add entry deletion support to __radix_tree_replace() Jan Kara <jack@suse.cz> - 2016-11-18 09:20 +0100
[PATCH 8/9] mm: workingset: move shadow entry tracking to radix tree exceptional tracking Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:40 +0100
Re: [PATCH 8/9] mm: workingset: move shadow entry tracking to radix tree exceptional tracking Jan Kara <jack@suse.cz> - 2016-11-18 09:30 +0100
[PATCH 7/9] lib: radix-tree: update callback for changing leaf nodes Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:40 +0100
Re: [PATCH 7/9] lib: radix-tree: update callback for changing leaf nodes Jan Kara <jack@suse.cz> - 2016-11-18 09:30 +0100
[PATCH 5/9] lib: radix-tree: check accounting of existing slot replacement users Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:40 +0100
Re: [PATCH 5/9] lib: radix-tree: check accounting of existing slot replacement users Jan Kara <jack@suse.cz> - 2016-11-18 08:50 +0100
[PATCH 9/9] mm: workingset: restore refault tracking for single-page files Johannes Weiner <hannes@cmpxchg.org> - 2016-11-17 20:40 +0100
Re: [PATCH 9/9] mm: workingset: restore refault tracking for single-page files Jan Kara <jack@suse.cz> - 2016-11-18 09:40 +0100
csiph-web