[lkml]   [2018]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] KVM: x86: Reduce retpoline performance impact in slot_handle_level_range()
On Sat, Feb 03, 2018 at 02:46:47PM +0000, David Woodhouse wrote:
> > For the simple case how about wrapping the if into
> >
> >                 call_likely(foo->bar, usualfunction, args)
> >
> > as a companion to 
> >
> >                  foo->bar(args)
> >
> > that can resolve to nothing special on architectures that don't need it,
> > an if/else case on platforms with spectre, and potentially clever
> > stuff on any platform where you can beat the compiler by knowing
> > probabilities it can't infer ?
> Yeah. I'm keen on being able to use something like alternatives to
> *change* 'usualfunction' at runtime though. I suspect it'll be a win
> for stuff like dma_ops.
> But I'm also keen to actually base such things on real data, not just
> go randomly "optimising" stuff just because we can. Let's try to make
> sure we fix up the real bottlenecks, and not just go crazy.

Google has a fairly long history of using feedback driven optimization
compiles for the kernel. They were also the ones that developed perf
autofdo tooling IIRC.

One of the things pjt promised was a series of patches doing the
proposed optimization for the scheduler code based on their results.

 \ /
  Last update: 2018-02-05 09:53    [W:0.056 / U:2.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site