diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2018-06-08 03:10:48 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-08 03:34:39 +0300 |
commit | 804209d8a0096d9ed8c9891f987f42bc1a98b8f9 (patch) | |
tree | 5bbe9e03463b5cc932ce1c9cc90f29c38e3a2184 /include/linux/mpi.h | |
parent | b94078e69533ba237e2c229bca61bae47e6fafcc (diff) | |
download | linux-804209d8a0096d9ed8c9891f987f42bc1a98b8f9.tar.xz |
lib/percpu_ida.c: use _irqsave() instead of local_irq_save() + spin_lock
percpu_ida() decouples disabling interrupts from the locking operations.
This breaks some assumptions if the locking operations are replaced like
they are under -RT.
The same locking can be achieved by avoiding local_irq_save() and using
spin_lock_irqsave() instead. percpu_ida_alloc() gains one more preemption
point because after unlocking the fastpath and before the pool lock is
acquired, the interrupts are briefly enabled.
Link: http://lkml.kernel.org/r/20180504153218.7301-1-bigeasy@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Shaohua Li <shli@fb.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mpi.h')
0 files changed, 0 insertions, 0 deletions