Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578687

RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method
Date 2017-02-10 19:30 +0100
Message-ID <t9o7f-73R-7@gated-at.bofh.it> (permalink)
References (2 earlier) <t90oi-rG-7@gated-at.bofh.it> <t91DI-18P-11@gated-at.bofh.it> <t9k3E-4oZ-23@gated-at.bofh.it> <t9k3E-4oZ-21@gated-at.bofh.it> <t9moN-5Rn-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 10 Feb 2017, Stephen Hemminger wrote:

> Since sequence count algorithm is done by hypervisor, better to not reuse seqcount.
> Still concerned that the code is racy.

That's a different question and can only be answered by the hypervisor
folks. Dunno, whether they have barrier requirements. The seqcount stuff
relies on:

do {
	seq = READ_ONCE(s->sequence);

	smp_rmb();

	sample_data();
  
	smp_rmb();
} while (s->sequence != seq);

which pairs with the writer side:

       s->sequence++;
       
       smp_wmb();

       update_data();

       smp_wmb();

       s->sequence++;

That's important if the stuff happens cross CPU. If the update happens on
the same CPU then this is a different story and as there are VMexits
involved they might provide the required ordering already. But I can't tell
as I have no idea how that host side thing is done.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-09 15:20 +0100
  Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read  method Thomas Gleixner <tglx@linutronix.de> - 2017-02-09 18:10 +0100
    RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Stephen Hemminger <sthemmin@microsoft.com> - 2017-02-09 19:30 +0100
      Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read  method Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 15:10 +0100
        RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Stephen Hemminger <sthemmin@microsoft.com> - 2017-02-10 17:40 +0100
          RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read  method Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 19:30 +0100
            RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Dexuan Cui <decui@microsoft.com> - 2017-02-13 09:00 +0100
              RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read  method Thomas Gleixner <tglx@linutronix.de> - 2017-02-13 10:30 +0100
      Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-10 15:50 +0100
    RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method KY Srinivasan <kys@microsoft.com> - 2017-02-09 21:50 +0100
      Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Andy Lutomirski <luto@amacapital.net> - 2017-02-10 00:00 +0100
        Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Stephen Hemminger <stephen@networkplumber.org> - 2017-02-10 00:20 +0100
        Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-10 13:20 +0100
    Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-10 12:10 +0100
      Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read  method Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 12:40 +0100

csiph-web