[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180205085124.GF2249@hirez.programming.kicks-ass.net>
Date: Mon, 5 Feb 2018 09:51:24 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
KarimAllah Ahmed <karahmed@...zon.de>, sironi@...zon.de,
the arch/x86 maintainers <x86@...nel.org>,
KVM list <kvm@...r.kernel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...en8.de>, Paul Turner <pjt@...gle.com>
Subject: Re: [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.
https://gcc.gnu.org/wiki/AutoFDO/Tutorial
One of the things pjt promised was a series of patches doing the
proposed optimization for the scheduler code based on their results.
Powered by blists - more mailing lists