WSL2-Linux-Kernel/drivers/s390/scsi
Martin Peschke f32c9e03d4 scsi: zfcp: early returns for traces disabled via level
This patch adds early checks to avoid burning CPU cycles on
the assembly of trace entries which would be skipped anyway.

Introduce a static const variable to keep the trace level to check with
debug_level_enabled() in sync with the actual trace emit with
debug_event(). In order not to refactor the SAN tracing too much,
simply use a define instead.

This change is only for the non / semi hot paths,
while the actual (I/O) hot path was already improved earlier:
zfcp_dbf_scsi() is already guarded by its only caller _zfcp_dbf_scsi()
since commit dcd20e2316 ("[SCSI] zfcp: Only collect SCSI debug data for
matching trace levels").
zfcp_dbf_hba_fsf_res() is already guarded by its only caller
zfcp_dbf_hba_fsf_response() since commit 2e261af84c ("[SCSI] zfcp: Only
collect FSF/HBA debug data for matching trace levels").

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
[maier@linux.vnet.ibm.com: rebase, reword, default level 3 branch prediction]
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-10 19:37:03 -04:00
..
Makefile [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_aux.c scsi: zfcp: Remove unneeded linux/miscdevice.h include 2017-08-10 19:36:53 -04:00
zfcp_ccw.c zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_dbf.c scsi: zfcp: early returns for traces disabled via level 2017-08-10 19:37:03 -04:00
zfcp_dbf.h scsi: zfcp: fix kernel doc comment typos for struct zfcp_dbf_scsi 2017-08-10 19:37:01 -04:00
zfcp_def.h zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_erp.c scsi: zfcp: use setup_timer instead of init_timer 2017-08-10 19:36:53 -04:00
zfcp_ext.h scsi: zfcp: clean up no longer existent prototype from zfcp API header 2017-08-10 19:37:02 -04:00
zfcp_fc.c scsi: zfcp: clean up unnecessary module_param_named() with no_auto_port_rescan 2017-08-10 19:37:03 -04:00
zfcp_fc.h scsi: zfcp: use endianness conversions with common FC(P) struct fields 2017-08-10 19:37:00 -04:00
zfcp_fsf.c scsi: zfcp: clean up a member of struct zfcp_qdio that was assigned but never used 2017-08-10 19:37:02 -04:00
zfcp_fsf.h scsi: zfcp: use common code fcp_cmnd and fcp_resp with union in fsf_qtcb_bottom_io 2017-08-10 19:37:00 -04:00
zfcp_qdio.c scsi: zfcp: convert bool-definitions to use 'true' instead of '1' 2017-08-10 19:36:54 -04:00
zfcp_qdio.h scsi: zfcp: clean up a member of struct zfcp_qdio that was assigned but never used 2017-08-10 19:37:02 -04:00
zfcp_reqlist.h scsi: zfcp: fix use-after-"free" in FC ingress path after TMF 2016-12-14 15:14:04 -05:00
zfcp_scsi.c scsi: zfcp: fix missing trace records for early returns in TMF eh handlers 2017-08-10 19:36:56 -04:00
zfcp_sysfs.c zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_unit.c zfcp: Revert to original scanning behaviour 2016-04-15 16:53:12 -04:00