From: Shaohua Li Date: Fri, 8 Jul 2011 22:39:41 +0000 (-0700) Subject: mm: __tlb_remove_page() check the correct batch X-Git-Tag: firefly_0821_release~3680^2~5090 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b43c3aab0137595335b08b340a3f3e5af9818a6;p=firefly-linux-kernel-4.4.55.git mm: __tlb_remove_page() check the correct batch __tlb_remove_page() switches to a new batch page, but still checks space in the old batch. This check always fails, and causes a forced tlb flush. Signed-off-by: Shaohua Li Acked-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index 40b7531ee8ba..9b8a01d941cb 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -305,6 +305,7 @@ int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) if (batch->nr == batch->max) { if (!tlb_next_batch(tlb)) return 0; + batch = tlb->active; } VM_BUG_ON(batch->nr > batch->max);