linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Shaohua Li <shaohua.li@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm <linux-mm@kvack.org>
Subject: Re: [patch]mm: __tlb_remove_page checks correct batch
Date: Tue, 28 Jun 2011 11:10:42 +0200	[thread overview]
Message-ID: <1309252242.6701.176.camel@twins> (raw)
In-Reply-To: <1309232767.15392.200.camel@sli10-conroe>

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 <shaohua.li@intel.com>

Indeed!

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

> 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>

      reply	other threads:[~2011-06-28  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28  3:46 [patch]mm: __tlb_remove_page checks correct batch Shaohua Li
2011-06-28  9:10 ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309252242.6701.176.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=shaohua.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).