[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160511151957.GA12280@huangminfeis-MacBook-Pro.local>
Date: Wed, 11 May 2016 23:19:57 +0800
From: Minfei Huang <mnghuan@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Andy Lutomirski <luto@...capital.net>,
Borislav Petkov <bp@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, X86 ML <x86@...nel.org>,
Marcelo Tosatti <mtosatti@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] Cleanup __pvclock_read_cycles to remove useless variables
On 05/11/16 at 04:24P, Paolo Bonzini wrote:
>
>
> On 30/04/2016 23:57, Andy Lutomirski wrote:
> >> > Should we kill __pvclock_read_cycles in favor of vread_pvclock? It looks
> >> > doable at a quick scan...
> >> >
> > The in-kernel version might have to be a bit different because it
> > needs to handle the !stable case. If !stable, it should just use the
> > current CPU's copy which means that, realistically, it should just
> > get_cpu and use the local copy unconditionally. Other than that, it
> > could look a lot like the vread_pvclock variant.
> >
> > But I agree, the current thing is incomprehensible.
>
> It also lacks smp_rmb()s. One is more or less implicit in rdtsc, but
> you need one to separate __pvclock_read_cycles's reads of src->foo from
> pvclock_read_flags's read of src->version.
>
> Minfei, would you like to take a look?
Sure. I will take a look about this issue.
Thanks
Minfei
>
> Paolo
Powered by blists - more mailing lists