Re: [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Mon, Mar 12, 2007 at 06:08:11PM +0200, Avi Kivity wrote: > Joerg Roedel wrote: > >On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: > > > >>Joerg Roedel wrote: > >> > >>>From: Joerg Roedel <[EMAIL PROTECTED]> > >>> > >>>This patch simplifies the get_cycles_sync() function by remo

Re: [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Avi Kivity
Joerg Roedel wrote: On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: Joerg Roedel wrote: From: Joerg Roedel <[EMAIL PROTECTED]> This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces an optimization for AMD processors. The

Re: [discuss] [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Mon, Mar 12, 2007 at 02:29:43PM +0100, Michael Matz wrote: > Hi Joerg, > > On Mon, 12 Mar 2007, Joerg Roedel wrote: > > > > >+#define RDTSCP ".byte 0x0f, 0x01, 0xf9" > > > >+alternative_io_two("cpuid\nrdtsc", > > > >+ "rdtsc", X86_FEATURE_SYNC_RDTSC, > > > >+

Re: [discuss] [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Michael Matz
Hi Joerg, On Mon, 12 Mar 2007, Joerg Roedel wrote: > > >+#define RDTSCP ".byte 0x0f, 0x01, 0xf9" > > >+ alternative_io_two("cpuid\nrdtsc", > > >+ "rdtsc", X86_FEATURE_SYNC_RDTSC, > > >+ ".byte 0x0f, 0x01, 0xf9", X86_FEATURE_RDTSCP, > > > > > > > why not

Re: [discuss] [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Mon, Mar 12, 2007 at 02:09:18PM +0100, Andi Kleen wrote: > On Monday 12 March 2007 14:02, Joerg Roedel wrote: > > On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: > > > Joerg Roedel wrote: > > > >From: Joerg Roedel <[EMAIL PROTECTED]> > > > > > > > >This patch simplifies the get_cycle

Re: [discuss] [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Andi Kleen
On Monday 12 March 2007 14:02, Joerg Roedel wrote: > On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: > > Joerg Roedel wrote: > > >From: Joerg Roedel <[EMAIL PROTECTED]> > > > > > >This patch simplifies the get_cycles_sync() function by removing > > >the #ifdefs from it. Further it intro

Re: [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-12 Thread Joerg Roedel
On Fri, Mar 09, 2007 at 08:10:03PM +0200, Avi Kivity wrote: > Joerg Roedel wrote: > >From: Joerg Roedel <[EMAIL PROTECTED]> > > > >This patch simplifies the get_cycles_sync() function by removing > >the #ifdefs from it. Further it introduces an optimization for AMD > >processors. There the RDTSCP i

Re: [PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-09 Thread Avi Kivity
Joerg Roedel wrote: From: Joerg Roedel <[EMAIL PROTECTED]> This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces an optimization for AMD processors. There the RDTSCP instruction is used instead of CPUID;RDTSC which is helpfull if the kernel r

[PATCH 4/4 TRY#3] optimize and simplify get_cycles_sync()

2007-03-09 Thread Joerg Roedel
From: Joerg Roedel <[EMAIL PROTECTED]> This patch simplifies the get_cycles_sync() function by removing the #ifdefs from it. Further it introduces an optimization for AMD processors. There the RDTSCP instruction is used instead of CPUID;RDTSC which is helpfull if the kernel runs as a KVM guest. Ru