Re: [PATCH v3 4/4] scsi: use percpu counters for iostat counters in struct scsi_device

4 views
Skip to first unread message

Hannes Reinecke

unread,
2:21 AM (15 hours ago) 2:21 AM
to Sumit Saxena, Martin K . Petersen, Jens Axboe, James E . J . Bottomley, linux...@vger.kernel.org, linux...@vger.kernel.org, Adam Radford, Khalid Aziz, Adaptec OEM Raid Solutions, Matthew Wilcox, Hannes Reinecke, Juergen E . Fischer, Russell King, linux-ar...@lists.infradead.org, Finn Thain, Michael Schmitz, Anil Gurumurthy, Sudarsana Kalluru, Oliver Neukum, Ali Akcaagac, Jamie Lenehan, Ram Vegesna, target...@vger.kernel.org, Bradley Grove, Satish Kharat, Sesidhar Baddela, Karan Tilak Kumar, Yihang Li, Don Brace, stora...@microchip.com, HighPoint Linux Team, Tyrel Datwyler, Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxp...@lists.ozlabs.org, Brian King, Lee Duncan, Chris Leech, Mike Christie, open-...@googlegroups.com, Justin Tee, Paul Ely, Kashyap Desai, Shivasharan S, Chandrakanth Patil, megaraid...@broadcom.com, Sathya Prakash Veerichetty, Sreekanth Reddy, mpi3mr-li...@broadcom.com, Suganath Prabu Subramani, Ranjan Kumar, MPT-Fusio...@broadcom.com, Daniel Palmer, GOTO Masanori, YOKOTA Hiroshi, Jack Wang, Geoff Levand, Michael Reed, Nilesh Javali, GR-QLogic-Sto...@marvell.com, Narsimhulu Musini, K . Y . Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li, linux-...@vger.kernel.org, Michael S . Tsirkin, Jason Wang, Paolo Bonzini, Stefan Hajnoczi, Eugenio Perez, virtual...@lists.linux.dev, Vishal Bhakta, bcm-kernel-f...@broadcom.com, Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko, xen-...@lists.xenproject.org, John Garry
On 6/9/26 14:18, Sumit Saxena wrote:
> iorequest_cnt and iodone_cnt are updated on every command dispatch and
> completion, often from different CPUs on high queue depth workloads.
> Using adjacent atomic_t fields causes cache line contention between the
> submission and completion paths.
>
> Extend the same treatment to ioerr_cnt and iotmo_cnt so all four iostat
> counters in struct scsi_device use struct percpu_counter.
>
> Suggested-by: John Garry <john.g...@oracle.com>
> Signed-off-by: Sumit Saxena <sumit....@broadcom.com>
> ---
> drivers/scsi/scsi_error.c | 4 ++--
> drivers/scsi/scsi_lib.c | 10 +++++-----
> drivers/scsi/scsi_scan.c | 8 ++++++++
> drivers/scsi/scsi_sysfs.c | 23 ++++++++++++++---------
> drivers/scsi/sd.c | 2 +-
> include/scsi/scsi_device.h | 9 +++++----
> 6 files changed, 35 insertions(+), 21 deletions(-)
>
Good idea.

Reviewed-by: Hannes Reinecke <ha...@kernel.org>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
ha...@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Reply all
Reply to author
Forward
0 new messages