Re: [patch]mm: __tlb_remove_page checks correct batch
From: Peter Zijlstra <hidden>
Date: 2011-06-28 09:11:38
On Tue, 2011-06-28 at 11:46 +0800, Shaohua Li wrote:
__tlb_remove_page switchs to a new batch page, but still checks space in the old batch. This check always fails, and causes force tlb flush. Signed-off-by: Shaohua Li <redacted>
Indeed! Acked-by: Peter Zijlstra <redacted>
quoted hunk ↗ jump to hunk
diff --git a/mm/memory.c b/mm/memory.c index 40b7531..9b8a01d 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);
-- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>