linux/drivers/scsi/libfc
Davidlohr Bueso a0548edf85 scsi: libfc: Remove get_cpu() semantics in fc_exch_em_alloc()
The get_cpu() in fc_exch_em_alloc() was introduced in commit f018b73af6
("[SCSI] libfc, libfcoe, fcoe: use smp_processor_id() only when preempt
disabled") for no other reason than to simply use smp_processor_id()
without getting a warning, because everything is done with the pool->lock
held anyway.  However, get_cpu(), by disabling preemption, does not play
well with PREEMPT_RT, particularly when acquiring a regular (and thus
sleepable) spinlock.

Therefore remove the get_cpu() and just use the unstable value as we will
have CPU locality guarantees next by taking the lock.  The window of
migration, as noted by Sebastian, is small and even if it happens the
result is correct.

Link: https://lore.kernel.org/r/20211117025956.79616-2-dave@stgolabs.net
Link: https://lore.kernel.org/r/20220506105758.283887-4-bigeasy@linutronix.de
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-05-16 21:26:50 -04:00
..
fc_disc.c scsi: libfc: Fix passing zero to 'PTR_ERR' warning 2020-09-15 17:51:39 -04:00
fc_elsct.c scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_encode.h scsi: libfc: Replace one-element arrays with flexible-array members 2022-02-27 21:17:37 -05:00
fc_exch.c scsi: libfc: Remove get_cpu() semantics in fc_exch_em_alloc() 2022-05-16 21:26:50 -04:00
fc_fcp.c scsi: fcoe: Use per-CPU API to update per-CPU statistics 2022-05-16 21:26:50 -04:00
fc_frame.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_libfc.c scsi: libfc: Move scsi/fc_encode.h to libfc 2020-10-29 21:49:25 -04:00
fc_libfc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_lport.c scsi: fcoe: Use per-CPU API to update per-CPU statistics 2022-05-16 21:26:50 -04:00
fc_npiv.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fc_rport.c scsi: libfc: Fix array index out of bound exception 2021-06-28 22:31:16 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00