From: Bart Van Assche <bvanassche@acm.org>
To: Mike Christie <michael.christie@oracle.com>,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org
Subject: Re: [PATCH 1/1] scsi: target: Move LUN stats to per CPU
Date: Thu, 24 Jul 2025 08:06:02 -0700 [thread overview]
Message-ID: <f4b61b0e-ec90-4a84-9679-74cbbda5cbae@acm.org> (raw)
In-Reply-To: <20250724004558.40993-1-michael.christie@oracle.com>
On 7/23/25 5:45 PM, Mike Christie wrote:
> diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
> index c4d9116904aa..e73fb224625d 100644
> --- a/include/target/target_core_base.h
> +++ b/include/target/target_core_base.h
> @@ -744,9 +744,9 @@ struct se_port_stat_grps {
> };
>
> struct scsi_port_stats {
> - atomic_long_t cmd_pdus;
> - atomic_long_t tx_data_octets;
> - atomic_long_t rx_data_octets;
> + u32 cmd_pdus;
> + u32 tx_data_octets;
> + u32 rx_data_octets;
> };
>
> struct se_lun {
> @@ -773,7 +773,7 @@ struct se_lun {
> spinlock_t lun_tg_pt_gp_lock;
>
> struct se_portal_group *lun_tpg;
> - struct scsi_port_stats lun_stats;
> + struct scsi_port_stats __percpu *lun_stats;
> struct config_group lun_group;
> struct se_port_stat_grps port_stat_grps;
> struct completion lun_shutdown_comp;
Is this perhaps an open-coded implementation of struct percpu_counter?
Why hasn't struct percpu_counter been used? I think this should be
explained in the patch description.
Thanks,
Bart.
next prev parent reply other threads:[~2025-07-24 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 0:45 [PATCH 1/1] scsi: target: Move LUN stats to per CPU Mike Christie
2025-07-24 14:26 ` kernel test robot
2025-07-24 15:06 ` Bart Van Assche [this message]
2025-07-28 15:08 ` Dmitry Bogdanov
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=f4b61b0e-ec90-4a84-9679-74cbbda5cbae@acm.org \
--to=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=target-devel@vger.kernel.org \
/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