Skip to content

Commit

Permalink
mm: __tlb_remove_page() check the correct batch
Browse files Browse the repository at this point in the history
__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 <shaohua.li@intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Shaohua Li authored and Linus Torvalds committed Jul 9, 2011
1 parent 215ddd6 commit 0b43c3a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0b43c3a

Please sign in to comment.