mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Karan Tilak Kumar <kartilak@cisco.com>, sebaddel@cisco.com
Cc: arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com,
	mkai2@cisco.com, satishkh@cisco.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 08/13] scsi: fnic: Define stats to track multiqueue (MQ) IOs
Date: Thu, 2 Nov 2023 08:46:55 +0100	[thread overview]
Message-ID: <b431d9d6-1c6d-4df4-92c3-2f8fdf0fb7b7@suse.de> (raw)
In-Reply-To: <20231027180302.418676-9-kartilak@cisco.com>

On 10/27/23 20:02, Karan Tilak Kumar wrote:
> Define an array to track IOs for the different queues,
> print the IO stats in fnic get stats data.
> 
> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
> ---
>   drivers/scsi/fnic/fnic_stats.h |  2 ++
>   drivers/scsi/fnic/fnic_trace.c | 11 +++++++++++
>   2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/scsi/fnic/fnic_stats.h b/drivers/scsi/fnic/fnic_stats.h
> index 07d1556e3c32..9d7f98c452dd 100644
> --- a/drivers/scsi/fnic/fnic_stats.h
> +++ b/drivers/scsi/fnic/fnic_stats.h
> @@ -2,6 +2,7 @@
>   /* Copyright 2013 Cisco Systems, Inc.  All rights reserved. */
>   #ifndef _FNIC_STATS_H_
>   #define _FNIC_STATS_H_
> +#define FNIC_MQ_MAX_QUEUES 64
>   
>   struct stats_timestamps {
>   	struct timespec64 last_reset_time;
> @@ -26,6 +27,7 @@ struct io_path_stats {
>   	atomic64_t io_btw_10000_to_30000_msec;
>   	atomic64_t io_greater_than_30000_msec;
>   	atomic64_t current_max_io_time;
> +	atomic64_t ios[FNIC_MQ_MAX_QUEUES];
>   };
>   
>   struct abort_stats {
> diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
> index be0d7c57b242..aaa4ea02fb7c 100644
> --- a/drivers/scsi/fnic/fnic_trace.c
> +++ b/drivers/scsi/fnic/fnic_trace.c
> @@ -204,6 +204,7 @@ int fnic_get_stats_data(struct stats_debug_info *debug,
>   	int len = 0;
>   	int buf_size = debug->buf_size;
>   	struct timespec64 val1, val2;
> +	int i = 0;
>   
>   	ktime_get_real_ts64(&val1);
>   	len = scnprintf(debug->debug_buffer + len, buf_size - len,
> @@ -266,6 +267,16 @@ int fnic_get_stats_data(struct stats_debug_info *debug,
>   		  (u64)atomic64_read(&stats->io_stats.io_btw_10000_to_30000_msec),
>   		  (u64)atomic64_read(&stats->io_stats.io_greater_than_30000_msec));
>   
> +	len += scnprintf(debug->debug_buffer + len, buf_size - len,
> +			"------------------------------------------\n"
> +			"\t\tIO Queues and cumulative IOs\n"
> +			"------------------------------------------\n");
> +
> +	for (i = 0; i < FNIC_MQ_MAX_QUEUES; i++) {
> +		len += scnprintf(debug->debug_buffer + len, buf_size - len,
> +				"Q:%d -> %lld\n", i, (u64)atomic64_read(&stats->io_stats.ios[i]));
> +	}
> +
>   	len += scnprintf(debug->debug_buffer + len, buf_size - len,
>   		  "\nCurrent Max IO time : %lld\n",
>   		  (u64)atomic64_read(&stats->io_stats.current_max_io_time));

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman


  reply	other threads:[~2023-11-02  7:47 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 18:02 [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic Karan Tilak Kumar
2023-10-27 18:02 ` [PATCH v2 01/13] scsi: fnic: Modify definitions to sync with VIC firmware Karan Tilak Kumar
2023-11-02  7:23   ` Hannes Reinecke
2023-11-06 19:47     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 02/13] scsi: fnic: Add and use fnic number Karan Tilak Kumar
2023-11-02  7:25   ` Hannes Reinecke
2023-11-06 19:49     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 03/13] scsi: fnic: Add and improve log messages Karan Tilak Kumar
2023-11-02  7:27   ` Hannes Reinecke
2023-11-06 19:55     ` Karan Tilak Kumar (kartilak)
2023-11-07  7:20       ` Hannes Reinecke
2023-11-07 19:54         ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 04/13] scsi: fnic: Rename wq_copy to hw_copy_wq Karan Tilak Kumar
2023-11-02  7:28   ` Hannes Reinecke
2023-11-06 19:57     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 05/13] scsi: fnic: Get copy workqueue count and interrupt mode from config Karan Tilak Kumar
2023-11-02  7:29   ` Hannes Reinecke
2023-11-06 19:59     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 06/13] scsi: fnic: Refactor and redefine fnic.h for multiqueue Karan Tilak Kumar
2023-11-02  7:36   ` Hannes Reinecke
2023-11-06 20:11     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 07/13] scsi: fnic: Modify ISRs to support multiqueue(MQ) Karan Tilak Kumar
2023-11-02  7:45   ` Hannes Reinecke
2023-11-06 20:13     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 08/13] scsi: fnic: Define stats to track multiqueue (MQ) IOs Karan Tilak Kumar
2023-11-02  7:46   ` Hannes Reinecke [this message]
2023-10-27 18:02 ` [PATCH v2 09/13] scsi: fnic: Remove usage of host_lock Karan Tilak Kumar
2023-11-02  7:52   ` Hannes Reinecke
2023-11-06 20:20     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:02 ` [PATCH v2 10/13] scsi: fnic: Add support for multiqueue (MQ) in fnic_main.c Karan Tilak Kumar
2023-11-02  7:57   ` Hannes Reinecke
2023-10-27 18:03 ` [PATCH v2 11/13] scsi: fnic: Use fnic_lock to protect fnic structures in queuecommand Karan Tilak Kumar
2023-11-02  8:02   ` Hannes Reinecke
2023-10-27 18:03 ` [PATCH v2 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic driver Karan Tilak Kumar
2023-10-29 17:20   ` kernel test robot
2023-11-02  8:11   ` Hannes Reinecke
2023-11-06 20:25     ` Karan Tilak Kumar (kartilak)
2023-10-27 18:03 ` [PATCH v2 13/13] scsi: fnic: Improve logs and add support for multiqueue (MQ) Karan Tilak Kumar
2023-11-02  7:59   ` Hannes Reinecke
2023-11-06 20:44     ` Karan Tilak Kumar (kartilak)
2023-11-07  7:27       ` Hannes Reinecke
2023-11-07 18:41         ` Karan Tilak Kumar (kartilak)
2023-11-02  8:14   ` Hannes Reinecke
2023-11-06 20:30     ` Karan Tilak Kumar (kartilak)
2023-11-02  9:00 ` [PATCH v2 00/13] Introduce support for multiqueue (MQ) in fnic John Garry
2023-11-06 19:44   ` Karan Tilak Kumar (kartilak)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b431d9d6-1c6d-4df4-92c3-2f8fdf0fb7b7@suse.de \
    --to=hare@suse.de \
    --cc=arulponn@cisco.com \
    --cc=djhawar@cisco.com \
    --cc=gcboffa@cisco.com \
    --cc=jejb@linux.ibm.com \
    --cc=kartilak@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mkai2@cisco.com \
    --cc=satishkh@cisco.com \
    --cc=sebaddel@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®