Hi John, > -----Original Message----- > From: John Garry <john.g.garry@xxxxxxxxxx> > Sent: Monday, August 7, 2023 6:36 PM > To: Nilesh Javali <njavali@xxxxxxxxxxx>; martin.petersen@xxxxxxxxxx > Cc: linux-scsi@xxxxxxxxxxxxxxx; GR-QLogic-Storage-Upstream <GR-QLogic- > Storage-Upstream@xxxxxxxxxxx>; Anil Gurumurthy > <agurumurthy@xxxxxxxxxxx>; Shreyas Deodhar <sdeodhar@xxxxxxxxxxx> > Subject: [EXT] Re: [PATCH v2 07/10] qla2xxx: Observed call trace in > smp_processor_id() > > External Email > > ---------------------------------------------------------------------- > On 07/08/2023 13:09, Nilesh Javali wrote: > > From: Bikash Hazarika <bhazarika@xxxxxxxxxxx> > > > > Following Call Trace was observed, > > > > localhost kernel: nvme nvme0: NVME-FC{0}: controller connect complete > > localhost kernel: BUG: using smp_processor_id() in preemptible [00000000] > code: kworker/u129:4/75092 > > localhost kernel: nvme nvme0: NVME-FC{0}: new ctrl: NQN "nqn.1992- > 08.com.netapp:sn.b42d198afb4d11ecad6d00a098d6abfa:subsystem.PR_Channe > l2022_RH84_subsystem_291" > > localhost kernel: caller is qla_nvme_post_cmd+0x216/0x1380 [qla2xxx] > > localhost kernel: CPU: 6 PID: 75092 Comm: kworker/u129:4 Kdump: loaded > Tainted: G B W OE --------- --- 5.14.0-70.22.1.el9_0.x86_64+debug #1 > > localhost kernel: Hardware name: HPE ProLiant XL420 Gen10/ProLiant XL420 > Gen10, BIOS U39 01/13/2022 > > localhost kernel: Workqueue: nvme-wq nvme_async_event_work [nvme_core] > > localhost kernel: Call Trace: > > localhost kernel: dump_stack_lvl+0x57/0x7d > > localhost kernel: check_preemption_disabled+0xc8/0xd0 > > localhost kernel: qla_nvme_post_cmd+0x216/0x1380 [qla2xxx] > > > > Use raw_smp_processor_id api instead of smp_processor_id > > This patch changes 7x instances of when smp_processor_id() is used > without reasonable justification for all of them. > > Furthermore, for the instance where the calltrace is reported, above, > there is no mention of why it is indeed safe to use > raw_smp_processor_id() and why the warning from smp_processor_id() can > be ignored. > Thanks for the review. This patch aims to silent the warning message in case CONFIG_DEBUG_PREEMPT is turned on by any user reporting an issue. For qla2xxx driver it is not critical to have accurate CPU ID which would momentarily cause performance hit for the thread that pre-empted. Thanks, Nilesh