All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Peter Lieven <pl@dlhnet.de>
Cc: Vadim Rozenfeld <vrozenfe@redhat.com>,
	kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [RFC PATCH v3 1/2] add support for Hyper-V reference time counter
Date: Thu, 2 Jan 2014 18:05:55 -0200	[thread overview]
Message-ID: <20140102200555.GA9687@amt.cnet> (raw)
In-Reply-To: <52C58EE7.1040004@dlhnet.de>

On Thu, Jan 02, 2014 at 05:08:07PM +0100, Peter Lieven wrote:
> > Not using irq disable/enable pairs. The subtraction is not dependant on
> > any particular time.
> > 
> >                 local_irq_disable();
> >                 now_ns = get_kernel_ns();
> >                 local_irq_enable();
> >                 delta = user_ns.clock - now_ns;
> > 
> > Any interrupt that would affect the value of get_kernel_ns(), would
> > have a similar effect before the interrupts are disabled. So the 
> > disable/enable pair achieves nothing in practice. It was copied from
> > kvm_guest_time_update.
> > 
> > 
> 
> Thanks for clarifying. What about get_kernel_ns() can't this be interrupted?
> 
> Peter

It can handle interrupts. 

Disabling interrupts there is used when a
{rdtsc, system_time=get_kernel_ns()} tuple is wanted, to reduce
the physical time difference between execution of rdtsc and get_kernel_ns().



  reply	other threads:[~2014-01-02 20:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08 11:33 [RFC PATCH v3 0/2] Hyper-V timers Vadim Rozenfeld
2013-12-08 11:33 ` [RFC PATCH v3 1/2] add support for Hyper-V reference time counter Vadim Rozenfeld
2013-12-09 14:23   ` Paolo Bonzini
2013-12-10 10:46     ` Vadim Rozenfeld
2013-12-11 18:53   ` Marcelo Tosatti
2013-12-11 18:59     ` Marcelo Tosatti
2013-12-12  9:33       ` Paolo Bonzini
2014-01-02 16:52       ` Peter Lieven
2014-01-07  9:36         ` Vadim Rozenfeld
2014-01-07 17:52           ` Peter Lieven
2014-01-08  9:40             ` Vadim Rozenfeld
2014-01-08 10:15               ` Peter Lieven
2014-01-08 10:44                 ` Vadim Rozenfeld
2014-01-08 11:48                   ` Peter Lieven
2014-01-08 12:12                     ` Vadim Rozenfeld
2014-01-08 14:54                       ` Peter Lieven
2014-01-08 20:08                         ` Vadim Rozenfeld
2014-01-08 22:20                           ` Peter Lieven
2014-01-09 11:10                             ` Vadim Rozenfeld
2014-01-12 12:08                             ` Vadim Rozenfeld
2014-01-12 20:35                               ` Peter Lieven
2014-01-02 13:15     ` Peter Lieven
2014-01-02 13:57       ` Marcelo Tosatti
2014-01-02 16:08         ` Peter Lieven
2014-01-02 20:05           ` Marcelo Tosatti [this message]
2014-01-13 12:10     ` Vadim Rozenfeld
2013-12-08 11:33 ` [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment Vadim Rozenfeld
2013-12-09 14:32   ` Paolo Bonzini
2013-12-10 11:23     ` Vadim Rozenfeld
2013-12-10 16:52       ` Paolo Bonzini
2013-12-11 10:58         ` Vadim Rozenfeld
2013-12-11 12:28           ` Paolo Bonzini
2013-12-11 19:28       ` Marcelo Tosatti
2013-12-11 19:27   ` Marcelo Tosatti
2013-12-12  9:34     ` Paolo Bonzini
2014-01-14  4:11     ` Vadim Rozenfeld
2014-01-14 13:54       ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140102200555.GA9687@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=pl@dlhnet.de \
    --cc=vrozenfe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.