[Devel] [PATCH RHEL7 COMMIT] mm/tcache: Reset index before repeating invalidation
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Mar 1 11:54:18 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.45.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.17.1.vz7.45.6
------>
commit 050d50e22a9d4a782745b144f71b8d80d7edc719
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Thu Mar 1 11:54:17 2018 +0300
mm/tcache: Reset index before repeating invalidation
Commit 25176cdcdcc0 ("tcache: Fix race between tcache_invalidate_node()
and tcache_attach_page()")
removed reseting index before repeating invalidation. Essentially this
broke repeat logic entirely as we retry invalidation past the end of
the file.
Reset index to zero before invalidation retry.
https://jira.sw.ru/browse/PSBM-81760
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
Acked-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
mm/tcache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/tcache.c b/mm/tcache.c
index 6e0c10dd3339..31a9eb3d1e12 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -918,7 +918,7 @@ tcache_invalidate_node_pages(struct tcache_node *node)
bool repeat, synchronize_sched_once = true;
pgoff_t indices[TCACHE_PAGEVEC_SIZE];
struct page *pages[TCACHE_PAGEVEC_SIZE];
- pgoff_t index = 0;
+ pgoff_t index;
unsigned nr_pages;
int i;
@@ -926,6 +926,7 @@ tcache_invalidate_node_pages(struct tcache_node *node)
* First forbid new page insertions - see tcache_page_tree_replace.
*/
again:
+ index = 0;
repeat = false;
while ((nr_pages = tcache_lookup(pages, node, index,
TCACHE_PAGEVEC_SIZE, indices))) {
More information about the Devel
mailing list