Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-17 Thread H. Peter Anvin
On 10/13/2011 09:44 AM, Jeremy Fitzhardinge wrote: > > Yeah, that's a good question. There are three mechanisms with somewhat > overlapping concerns: > > * alternative() > * pvops patching > * jump_labels > > Alternative() is for low-level instruction substitution, and really only > makes

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-17 Thread Jason Baron
On Fri, Oct 14, 2011 at 12:02:43PM -0700, Jeremy Fitzhardinge wrote: > On 10/14/2011 11:35 AM, Jason Baron wrote: > > On Fri, Oct 14, 2011 at 10:02:35AM -0700, Jeremy Fitzhardinge wrote: > >> On 10/14/2011 07:17 AM, Jason Baron wrote: > >>> On Thu, Oct 13, 2011 at 09:44:48AM -0700, Jeremy Fitzhardi

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread H. Peter Anvin
On 10/14/2011 12:10 PM, Jeremy Fitzhardinge wrote: > > We probably don't want all those implementations (near) inline, so they > would end up being plain function calls anyway. > I would not object if the native one was closer, though; especially in term of source text (the current level of macr

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread Jeremy Fitzhardinge
On 10/14/2011 11:37 AM, H. Peter Anvin wrote: > On 10/14/2011 10:02 AM, Jeremy Fitzhardinge wrote: >> Jump labels are essentially binary: you can use path A or path B. pvops >> are multiway: there's no limit to the number of potential number of >> paravirtualized hypervisor implementations. At th

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread Jeremy Fitzhardinge
On 10/14/2011 11:35 AM, Jason Baron wrote: > On Fri, Oct 14, 2011 at 10:02:35AM -0700, Jeremy Fitzhardinge wrote: >> On 10/14/2011 07:17 AM, Jason Baron wrote: >>> On Thu, Oct 13, 2011 at 09:44:48AM -0700, Jeremy Fitzhardinge wrote: pvops is basically a collection of ordinary _ops structures f

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread Jeremy Fitzhardinge
On 10/14/2011 11:38 AM, H. Peter Anvin wrote: > On 10/14/2011 11:35 AM, Jason Baron wrote: >> A nice featuer of jump labels, is that it allows the various branches >> (currently we only support 2), to be written in c code (as opposed to asm), >> which means you can write your code as you normally w

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread H. Peter Anvin
On 10/14/2011 11:35 AM, Jason Baron wrote: > > A nice featuer of jump labels, is that it allows the various branches > (currently we only support 2), to be written in c code (as opposed to asm), > which means you can write your code as you normally would and access any > parameters as you normally

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread H. Peter Anvin
On 10/14/2011 10:02 AM, Jeremy Fitzhardinge wrote: > > Jump labels are essentially binary: you can use path A or path B. pvops > are multiway: there's no limit to the number of potential number of > paravirtualized hypervisor implementations. At the moment we have 4: > native, Xen, KVM and lgues

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread Jason Baron
On Fri, Oct 14, 2011 at 10:02:35AM -0700, Jeremy Fitzhardinge wrote: > On 10/14/2011 07:17 AM, Jason Baron wrote: > > On Thu, Oct 13, 2011 at 09:44:48AM -0700, Jeremy Fitzhardinge wrote: > >> pvops is basically a collection of ordinary _ops structures full of > >> function pointers, but it has a la

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread Jeremy Fitzhardinge
On 10/14/2011 07:17 AM, Jason Baron wrote: > On Thu, Oct 13, 2011 at 09:44:48AM -0700, Jeremy Fitzhardinge wrote: >> pvops is basically a collection of ordinary _ops structures full of >> function pointers, but it has a layer of patching to help optimise it. >> In the common case, this just replac

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-14 Thread Jason Baron
On Thu, Oct 13, 2011 at 09:44:48AM -0700, Jeremy Fitzhardinge wrote: > On 10/13/2011 03:54 AM, Peter Zijlstra wrote: > > On Wed, 2011-10-12 at 17:51 -0700, Jeremy Fitzhardinge wrote: > >> This is is all unnecessary complication if you're not using PV ticket > >> locks, it also uses the jump-label m

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-13 Thread Jeremy Fitzhardinge
On 10/13/2011 03:54 AM, Peter Zijlstra wrote: > On Wed, 2011-10-12 at 17:51 -0700, Jeremy Fitzhardinge wrote: >> This is is all unnecessary complication if you're not using PV ticket >> locks, it also uses the jump-label machinery to use the standard >> "add"-based unlock in the non-PV case. >> >>

Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-13 Thread Peter Zijlstra
On Wed, 2011-10-12 at 17:51 -0700, Jeremy Fitzhardinge wrote: > > This is is all unnecessary complication if you're not using PV ticket > locks, it also uses the jump-label machinery to use the standard > "add"-based unlock in the non-PV case. > > if (TICKET_SLOWPATH_FLAG && >

[PATCH RFC V5 00/11] Paravirtualized ticketlocks

2011-10-12 Thread Jeremy Fitzhardinge
From: Jeremy Fitzhardinge [ Changes since last posting: - Use "lock add" for unlock operation rather than "lock xadd"; it is equivalent to "add; mfence", but more efficient than both "lock xadd" and "mfence". I think this version is ready for submission. ] NOTE: this series is avai