WSL2-Linux-Kernel/arch
Jisheng Zhang b5fda7ed5c arm64: cpuidle: make arm_cpuidle_suspend() a bit more efficient
Currently, we check two pointers: cpu_ops and cpu_suspend on every idle
state entry. These pointers check can be avoided:

If cpu_ops has not been registered, arm_cpuidle_init() will return
-EOPNOTSUPP, so arm_cpuidle_suspend() will never have chance to
run. In other word, the cpu_ops check can be avoid.

Similarly, the cpu_suspend check could be avoided in this hot path by
moving it into arm_cpuidle_init().

I measured the 4096 * time from arm_cpuidle_suspend entry point to the
cpu_psci_cpu_suspend entry point. HW platform is Marvell BG4CT STB
board.

1. only one shell, no other process, hot-unplug secondary cpus, execute
the following cmd

while true
do
	sleep 0.2
done

before the patch: 1581220ns

after the patch: 1579630ns

reduced by 0.1%

2. only one shell, no other process, hot-unplug secondary cpus, execute
the following cmd

while true
do
	md5sum /tmp/testfile
	sleep 0.2
done

NOTE: the testfile size should be larger than L1+L2 cache size

before the patch: 1961960ns
after the patch: 1912500ns

reduced by 2.5%

So the more complex the system load, the bigger the improvement.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-04-13 14:49:23 +01:00
..
alpha
arc mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
arm Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-04-10 17:48:17 -07:00
arm64 arm64: cpuidle: make arm_cpuidle_suspend() a bit more efficient 2016-04-13 14:49:23 +01:00
avr32
blackfin arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
c6x arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
cris
frv asm-generic changes for 4.6 2016-03-24 23:13:48 -07:00
h8300
hexagon
ia64 [IA64] Enable preadv2 and pwritev2 syscalls for ia64 2016-03-25 14:37:32 -07:00
m32r
m68k asm-generic changes for 4.6 2016-03-24 23:13:48 -07:00
metag arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
microblaze arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
mips MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation 2016-04-04 15:25:34 +02:00
mn10300
nios2 nios2: Replace fdt_translate_address with of_flat_dt_translate_address 2016-03-31 08:15:45 +08:00
openrisc arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
parisc parisc: Update comment regarding relative extable support 2016-04-08 22:14:26 +02:00
powerpc Merge branch 'PAGE_CACHE_SIZE-removal' 2016-04-04 10:50:24 -07:00
s390 Miscellaneous bugfixes. ARM and s390 are new from the merge window, 2016-04-05 16:16:00 -07:00
score
sh arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2016-03-28 15:14:11 -05:00
tile Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2016-03-28 15:04:55 -05:00
um
unicore32
x86 Power management and ACPI material for v4.6-rc3 2016-04-09 11:03:48 -07:00
xtensa
.gitignore
Kconfig