Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstraction

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeremy Fitzhardinge <jeremy@...>
Cc: <benh@...>, xen-devel <xen-devel@...>, Peter Zijlstra <a.p.zijlstra@...>, kvm-devel <kvm-devel@...>, <x86@...>, LKML <linux-kernel@...>, Virtualization Mailing List <virtualization@...>, Hugh Dickins <hugh@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>
Date: Wednesday, June 18, 2008 - 8:49 pm

On Wed, 18 Jun 2008, Jeremy Fitzhardinge wrote:

Well, we can actually do it as

	lock andl $~_PAGE_RW,(%rbx)

although we haven't bothered (I've wanted several times to make 
clear_bit() do that, but have never gotten around to it - mainly because 
old gcc versions didn't work with __builtin_constant_p() in inline 
functions - so you have to do the macro from hell)

And yes, the "lock andl" should be noticeably faster than the xchgl.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0 of 4] mm+paravirt+xen: add pte read-modify-write ab..., Jeremy Fitzhardinge, (Mon Jun 16, 7:29 am)
[PATCH 2 of 4] paravirt: add hooks for ptep_modify_prot_star..., Jeremy Fitzhardinge, (Mon Jun 16, 7:30 am)
[PATCH 4 of 4] xen: add mechanism to extend existing multica..., Jeremy Fitzhardinge, (Mon Jun 16, 7:30 am)
[PATCH 3 of 4] xen: implement ptep_modify_prot_start/commit, Jeremy Fitzhardinge, (Mon Jun 16, 7:30 am)
[PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstra..., Jeremy Fitzhardinge, (Mon Jun 16, 7:30 am)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Benjamin Herrenschmidt, (Wed Jun 18, 7:23 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Wed Jun 18, 7:59 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Wed Jun 18, 8:15 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Benjamin Herrenschmidt, (Wed Jun 18, 8:39 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Thu Jun 19, 1:03 am)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Benjamin Herrenschmidt, (Thu Jun 19, 3:20 am)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Thu Jun 19, 1:57 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Wed Jun 18, 8:37 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Linus Torvalds, (Wed Jun 18, 8:49 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Fri Jun 20, 3:06 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Fri Jun 20, 4:05 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Fri Jun 20, 4:16 pm)
Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction ab..., Jeremy Fitzhardinge, (Fri Jun 20, 4:22 pm)