Revision 928a4c39484281f8ca366f53a1db79330d058401 authored by David Woodhouse on 10 February 2018, 23:39:24 UTC, committed by Ingo Molnar on 13 February 2018, 07:59:45 UTC
With retpoline, tight loops of "call this function for every XXX" are very much pessimised by taking a prediction miss *every* time. This one is by far the biggest contributor to the guest launch time with retpoline. By marking the iterator slot_handle_…() functions always_inline, we can ensure that the indirect function call can be optimised away into a direct call and it actually generates slightly smaller code because some of the other conditionals can get optimised away too. Performance is now pretty close to what we see with nospectre_v2 on the command line. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: Filippo Sironi <sironi@amazon.de> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Filippo Sironi <sironi@amazon.de> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: arjan.van.de.ven@intel.com Cc: dave.hansen@intel.com Cc: jmattson@google.com Cc: karahmed@amazon.de Cc: kvm@vger.kernel.org Cc: rkrcmar@redhat.com Link: http://lkml.kernel.org/r/1518305967-31356-4-git-send-email-dwmw@amazon.co.uk Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent f208820
File | Mode | Size |
---|---|---|
partitions | ||
Kconfig | -rw-r--r-- | 6.2 KB |
Kconfig.iosched | -rw-r--r-- | 2.7 KB |
Makefile | -rw-r--r-- | 1.5 KB |
badblocks.c | -rw-r--r-- | 14.5 KB |
bfq-cgroup.c | -rw-r--r-- | 33.6 KB |
bfq-iosched.c | -rw-r--r-- | 170.4 KB |
bfq-iosched.h | -rw-r--r-- | 31.4 KB |
bfq-wf2q.c | -rw-r--r-- | 52.0 KB |
bio-integrity.c | -rw-r--r-- | 13.8 KB |
bio.c | -rw-r--r-- | 49.6 KB |
blk-cgroup.c | -rw-r--r-- | 37.8 KB |
blk-core.c | -rw-r--r-- | 101.2 KB |
blk-exec.c | -rw-r--r-- | 2.9 KB |
blk-flush.c | -rw-r--r-- | 17.0 KB |
blk-integrity.c | -rw-r--r-- | 12.1 KB |
blk-ioc.c | -rw-r--r-- | 11.0 KB |
blk-lib.c | -rw-r--r-- | 10.6 KB |
blk-map.c | -rw-r--r-- | 5.9 KB |
blk-merge.c | -rw-r--r-- | 19.7 KB |
blk-mq-cpumap.c | -rw-r--r-- | 1.7 KB |
blk-mq-debugfs.c | -rw-r--r-- | 23.5 KB |
blk-mq-debugfs.h | -rw-r--r-- | 2.1 KB |
blk-mq-pci.c | -rw-r--r-- | 1.6 KB |
blk-mq-rdma.c | -rw-r--r-- | 1.7 KB |
blk-mq-sched.c | -rw-r--r-- | 15.9 KB |
blk-mq-sched.h | -rw-r--r-- | 2.8 KB |
blk-mq-sysfs.c | -rw-r--r-- | 8.2 KB |
blk-mq-tag.c | -rw-r--r-- | 11.3 KB |
blk-mq-tag.h | -rw-r--r-- | 2.3 KB |
blk-mq-virtio.c | -rw-r--r-- | 1.7 KB |
blk-mq.c | -rw-r--r-- | 72.3 KB |
blk-mq.h | -rw-r--r-- | 5.2 KB |
blk-settings.c | -rw-r--r-- | 28.7 KB |
blk-softirq.c | -rw-r--r-- | 4.3 KB |
blk-stat.c | -rw-r--r-- | 4.8 KB |
blk-stat.h | -rw-r--r-- | 5.5 KB |
blk-sysfs.c | -rw-r--r-- | 23.4 KB |
blk-tag.c | -rw-r--r-- | 10.0 KB |
blk-throttle.c | -rw-r--r-- | 67.6 KB |
blk-timeout.c | -rw-r--r-- | 5.8 KB |
blk-wbt.c | -rw-r--r-- | 17.5 KB |
blk-wbt.h | -rw-r--r-- | 4.0 KB |
blk-zoned.c | -rw-r--r-- | 7.6 KB |
blk.h | -rw-r--r-- | 9.9 KB |
bounce.c | -rw-r--r-- | 6.5 KB |
bsg-lib.c | -rw-r--r-- | 7.5 KB |
bsg.c | -rw-r--r-- | 22.8 KB |
cfq-iosched.c | -rw-r--r-- | 127.1 KB |
cmdline-parser.c | -rw-r--r-- | 4.9 KB |
compat_ioctl.c | -rw-r--r-- | 10.9 KB |
deadline-iosched.c | -rw-r--r-- | 11.2 KB |
elevator.c | -rw-r--r-- | 27.2 KB |
genhd.c | -rw-r--r-- | 47.8 KB |
ioctl.c | -rw-r--r-- | 15.2 KB |
ioprio.c | -rw-r--r-- | 5.0 KB |
kyber-iosched.c | -rw-r--r-- | 21.7 KB |
mq-deadline.c | -rw-r--r-- | 16.8 KB |
noop-iosched.c | -rw-r--r-- | 2.6 KB |
opal_proto.h | -rw-r--r-- | 9.3 KB |
partition-generic.c | -rw-r--r-- | 16.8 KB |
scsi_ioctl.c | -rw-r--r-- | 19.9 KB |
sed-opal.c | -rw-r--r-- | 58.5 KB |
t10-pi.c | -rw-r--r-- | 4.9 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...