提交 0b43c3aa 编写于 作者: S Shaohua Li 提交者: Linus Torvalds

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: NShaohua Li <shaohua.li@intel.com>
Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 215ddd66
...@@ -305,6 +305,7 @@ int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) ...@@ -305,6 +305,7 @@ int __tlb_remove_page(struct mmu_gather *tlb, struct page *page)
if (batch->nr == batch->max) { if (batch->nr == batch->max) {
if (!tlb_next_batch(tlb)) if (!tlb_next_batch(tlb))
return 0; return 0;
batch = tlb->active;
} }
VM_BUG_ON(batch->nr > batch->max); VM_BUG_ON(batch->nr > batch->max);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册