exynos-linux-stable/drivers/char
Andi Kleen e021868ec7
random: optimize add_interrupt_randomness
add_interrupt_randomess always wakes up
code blocking on /dev/random. This wake up is done
unconditionally. Unfortunately this means all interrupts
take the wait queue spinlock, which can be rather expensive
on large systems processing lots of interrupts.

We saw 1% cpu time spinning on this on a large macro workload
running on a large system.

I believe it's a recent regression (?)

Always check if there is a waiter on the wait queue
before waking up. This check can be done without
taking a spinlock.

1.06%         10460  [kernel.vmlinux] [k] native_queued_spin_lock_slowpath
         |
         ---native_queued_spin_lock_slowpath
            |
             --0.57%--_raw_spin_lock_irqsave
                       |
                        --0.56%--__wake_up_common_lock
                                  credit_entropy_bits
                                  add_interrupt_randomness
                                  handle_irq_event_percpu
                                  handle_irq_event
                                  handle_edge_irq
                                  handle_irq
                                  do_IRQ
                                  common_interrupt

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-04-30 19:40:25 +03:00
..
agp treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
hw_random Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
ipmi This is the 4.9.216 stable release 2020-03-11 08:16:28 +01:00
mwave char/mwave: fix potential Spectre v1 vulnerability 2019-01-31 08:12:34 +01:00
pcmcia pcmcia: remove left-over %Z format 2017-06-07 12:07:48 +02:00
tpm UPSTREAM: Make anon_inodes unconditional 2019-09-03 13:44:37 -07:00
xilinx_hwicap
xillybus char: xillybus: Fix spelling mistake and comment 2016-08-31 14:47:54 +02:00
apm-emulation.c
applicom.c applicom: Fix potential Spectre v1 vulnerabilities 2019-03-13 14:04:54 -07:00
applicom.h
bfin-otp.c miscdevice: Use module_misc_device() macro 2016-08-31 14:12:35 +02:00
bsr.c
ds1302.c
ds1620.c
dsp56k.c dsp56k: prevent a harmless underflow 2016-07-14 16:21:53 +09:00
dtlk.c
efirtc.c
generic_nvram.c don't open-code generic_file_llseek_size() 2015-12-09 13:00:45 -05:00
hangcheck-timer.c
hpet.c hpet: Fix division by zero in hpet_time_div() 2019-08-04 09:33:43 +02:00
Kconfig Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
knox_kap.c import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
lp.c char: lp: fix possible integer overflow in lp_setup() 2017-05-25 15:44:30 +02:00
Makefile import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
mbcs.c don't open-code generic_file_llseek_size() 2015-12-09 13:00:45 -05:00
mbcs.h
mem.c Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
misc.c import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
mmtimer.c
mspec.c tree wide: use kvfree() than conditional kfree()/vfree() 2016-01-22 17:02:18 -08:00
mst_ctrl.c import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
nsc_gpio.c
nvram.c char/nvram: set array of const as const 2016-02-08 14:57:30 -08:00
nwbutton.c char: nwbutton: avoid unused variable warning 2016-02-09 17:39:56 -08:00
nwbutton.h
nwflash.c new helpers: no_seek_end_llseek{,_size}() 2015-12-23 10:41:31 -05:00
pc8736x_gpio.c
powernv-op-panel.c powerpc/powernv: Add driver for operator panel on FSP machines 2016-06-29 17:33:46 +10:00
ppdev.c ppdev: fix PPGETTIME/PPSETTIME ioctls 2019-12-21 10:42:07 +01:00
ps3flash.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
random.c random: optimize add_interrupt_randomness 2023-04-30 19:40:25 +03:00
raw.c drivers: char: raw: Removed unnecessary braces 2016-02-08 14:57:30 -08:00
rtc.c
scx200_gpio.c
snsc.c snsc: check return value of class_create 2016-08-31 14:47:54 +02:00
snsc.h
snsc_event.c
sonypi.c fs: Replace current_fs_time() with current_time() 2016-09-27 21:06:22 -04:00
tb0219.c mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
tile-srom.c tile-srom: avoid krealloc(... __GFP_ZERO) pattern 2016-08-30 14:45:50 +02:00
tlclk.c
toshiba.c
ttyprintk.c ttyprintk: fix a potential deadlock in interrupt context issue 2020-02-05 13:05:47 +00:00
uv_mmtimer.c
virtio_console.c virtio_console: move removal code 2019-11-28 18:29:05 +01:00