lkml.org 
[lkml]   [2016]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Cleanup __pvclock_read_cycles to remove useless variables
On Apr 30, 2016 12:17 PM, "Borislav Petkov" <bp@suse.de> wrote:
>
> On Sat, Apr 30, 2016 at 10:47:49AM -0700, Andy Lutomirski wrote:
> > Take a look at vread_pvclock. I decided that __pvclock_read_cycles
> > was too ugly to use and was very slow and I just gave up and rewrote
> > it.
>
> 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.

--Andy

> --
> Regards/Gruss,
> Boris.
>
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
> --

\
 
 \ /
  Last update: 2016-05-01 00:21    [W:0.057 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site