public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] x86: change_page_attr_clear fix
@ 2008-01-31  7:35 Huang, Ying
  2008-01-31  7:43 ` Andi Kleen
  2008-01-31 12:10 ` Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: Huang, Ying @ 2008-01-31  7:35 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andi Kleen; +Cc: linux-kernel

This patch replaces __change_page_attr_set_clr() with
change_page_attr_set_clr() in change_page_attr_clear() to flush the
TLB/cache properly.

Signed-off-by: Huang Ying <ying.huang@intel.com>

---
 arch/x86/mm/pageattr.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -426,8 +426,7 @@ static inline int change_page_attr_set(u
 static inline int change_page_attr_clear(unsigned long addr, int numpages,
 					 pgprot_t mask)
 {
-	return __change_page_attr_set_clr(addr, numpages, __pgprot(0), mask);
-
+	return change_page_attr_set_clr(addr, numpages, __pgprot(0), mask);
 }
 
 int set_memory_uc(unsigned long addr, int numpages)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/5] x86: change_page_attr_clear fix
  2008-01-31  7:35 [PATCH 1/5] x86: change_page_attr_clear fix Huang, Ying
@ 2008-01-31  7:43 ` Andi Kleen
  2008-01-31 12:38   ` Thomas Gleixner
  2008-01-31 12:10 ` Ingo Molnar
  1 sibling, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2008-01-31  7:43 UTC (permalink / raw)
  To: Huang, Ying; +Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, linux-kernel

On Thursday 31 January 2008 08:35:59 Huang, Ying wrote:
> This patch replaces __change_page_attr_set_clr() with
> change_page_attr_set_clr() in change_page_attr_clear() to flush the
> TLB/cache properly.

Good catch :-) It actually only needs to flush TLBs not caches in this 
case.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/5] x86: change_page_attr_clear fix
  2008-01-31  7:35 [PATCH 1/5] x86: change_page_attr_clear fix Huang, Ying
  2008-01-31  7:43 ` Andi Kleen
@ 2008-01-31 12:10 ` Ingo Molnar
  1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-01-31 12:10 UTC (permalink / raw)
  To: Huang, Ying
  Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andi Kleen,
	linux-kernel


* Huang, Ying <ying.huang@intel.com> wrote:

> This patch replaces __change_page_attr_set_clr() with 
> change_page_attr_set_clr() in change_page_attr_clear() to flush the 
> TLB/cache properly.

thanks, applied. Thomas just found this bug today too :-)

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/5] x86: change_page_attr_clear fix
  2008-01-31  7:43 ` Andi Kleen
@ 2008-01-31 12:38   ` Thomas Gleixner
  2008-01-31 12:53     ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2008-01-31 12:38 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Huang, Ying, Ingo Molnar, H. Peter Anvin, linux-kernel

On Thu, 31 Jan 2008, Andi Kleen wrote:

> On Thursday 31 January 2008 08:35:59 Huang, Ying wrote:
> > This patch replaces __change_page_attr_set_clr() with
> > change_page_attr_set_clr() in change_page_attr_clear() to flush the
> > TLB/cache properly.
> 
> Good catch :-) It actually only needs to flush TLBs not caches in this 
> case.

That's one of the items on our optimizations todo list already. There
are more low hanging fruits, but we need to make sure that the non
optimized version is bullet proof first.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/5] x86: change_page_attr_clear fix
  2008-01-31 12:38   ` Thomas Gleixner
@ 2008-01-31 12:53     ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2008-01-31 12:53 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Huang, Ying, Ingo Molnar, H. Peter Anvin, linux-kernel

On Thursday 31 January 2008 13:38:45 Thomas Gleixner wrote:
> On Thu, 31 Jan 2008, Andi Kleen wrote:
> 
> > On Thursday 31 January 2008 08:35:59 Huang, Ying wrote:
> > > This patch replaces __change_page_attr_set_clr() with
> > > change_page_attr_set_clr() in change_page_attr_clear() to flush the
> > > TLB/cache properly.
> > 
> > Good catch :-) It actually only needs to flush TLBs not caches in this 
> > case.
> 
> That's one of the items on our optimizations todo list already. There
> are more low hanging fruits, but we need to make sure that the non
> optimized version is bullet proof first.

I actually ported it already forward from my old patchkit (together
with some other improvements). Will post later.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-31 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31  7:35 [PATCH 1/5] x86: change_page_attr_clear fix Huang, Ying
2008-01-31  7:43 ` Andi Kleen
2008-01-31 12:38   ` Thomas Gleixner
2008-01-31 12:53     ` Andi Kleen
2008-01-31 12:10 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox