public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* x86: kvmclock: drop rdtsc_barrier()
@ 2015-04-25  1:36 Marcelo Tosatti
  2015-04-25  1:45 ` Rik van Riel
  2015-04-29  1:47 ` Marcelo Tosatti
  0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2015-04-25  1:36 UTC (permalink / raw)
  To: kvm; +Cc: Andy Lutomirski, Rik van Riel


Drop unnecessary rdtsc_barrier(), as has been determined empirically,
see 057e6a8c660e95c3f4e7162e00e2fee1fc90c50d for details.

Noticed by Andy Lutomirski.

Improves clock_gettime() by approximately 15% on 
Intel i7-3520M @ 2.90GHz.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h
index 25b1cc0..a5beb23 100644
--- a/arch/x86/include/asm/pvclock.h
+++ b/arch/x86/include/asm/pvclock.h
@@ -86,7 +86,6 @@ unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src,
 	offset = pvclock_get_nsec_offset(src);
 	ret = src->system_time + offset;
 	ret_flags = src->flags;
-	rdtsc_barrier();
 
 	*cycles = ret;
 	*flags = ret_flags;


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

* Re: x86: kvmclock: drop rdtsc_barrier()
  2015-04-25  1:36 x86: kvmclock: drop rdtsc_barrier() Marcelo Tosatti
@ 2015-04-25  1:45 ` Rik van Riel
  2015-04-29  1:47 ` Marcelo Tosatti
  1 sibling, 0 replies; 3+ messages in thread
From: Rik van Riel @ 2015-04-25  1:45 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm; +Cc: Andy Lutomirski

On 04/24/2015 09:36 PM, Marcelo Tosatti wrote:
> 
> Drop unnecessary rdtsc_barrier(), as has been determined empirically,
> see 057e6a8c660e95c3f4e7162e00e2fee1fc90c50d for details.
> 
> Noticed by Andy Lutomirski.
> 
> Improves clock_gettime() by approximately 15% on 
> Intel i7-3520M @ 2.90GHz.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Acked-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed

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

* Re: x86: kvmclock: drop rdtsc_barrier()
  2015-04-25  1:36 x86: kvmclock: drop rdtsc_barrier() Marcelo Tosatti
  2015-04-25  1:45 ` Rik van Riel
@ 2015-04-29  1:47 ` Marcelo Tosatti
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2015-04-29  1:47 UTC (permalink / raw)
  To: kvm; +Cc: Andy Lutomirski, Rik van Riel

On Fri, Apr 24, 2015 at 10:36:14PM -0300, Marcelo Tosatti wrote:
> 
> Drop unnecessary rdtsc_barrier(), as has been determined empirically,
> see 057e6a8c660e95c3f4e7162e00e2fee1fc90c50d for details.
> 
> Noticed by Andy Lutomirski.
> 
> Improves clock_gettime() by approximately 15% on 
> Intel i7-3520M @ 2.90GHz.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h
> index 25b1cc0..a5beb23 100644
> --- a/arch/x86/include/asm/pvclock.h
> +++ b/arch/x86/include/asm/pvclock.h
> @@ -86,7 +86,6 @@ unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src,
>  	offset = pvclock_get_nsec_offset(src);
>  	ret = src->system_time + offset;
>  	ret_flags = src->flags;
> -	rdtsc_barrier();
>  
>  	*cycles = ret;
>  	*flags = ret_flags;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Ping?


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

end of thread, other threads:[~2015-04-29  1:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-25  1:36 x86: kvmclock: drop rdtsc_barrier() Marcelo Tosatti
2015-04-25  1:45 ` Rik van Riel
2015-04-29  1:47 ` Marcelo Tosatti

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