public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
	John Garry <john.g.garry@oracle.com>,
	Hannes Reinecke <hare@suse.de>,
	Christoph Hellwig <hch@infradead.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Niklas Cassel <cassel@kernel.org>, Christoph Hellwig <hch@lst.de>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: [PATCH v4 4/6] ata: libata: Set .needs_budget_token
Date: Tue, 16 Dec 2025 14:30:48 -0800	[thread overview]
Message-ID: <20251216223052.350366-5-bvanassche@acm.org> (raw)
In-Reply-To: <20251216223052.350366-1-bvanassche@acm.org>

Make the SCSI core set cmd->budget_token because there is code in the
ATA core that uses this member variable directly. Prepare for skipping
the SCSI budget map allocation if this map is not needed.

Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Niklas Cassel <cassel@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ata/libata-scsi.c | 1 +
 include/scsi/scsi_host.h  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 026122bb6f2f..66f69116de60 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -4499,6 +4499,7 @@ int ata_scsi_add_hosts(struct ata_host *host, const struct scsi_host_template *s
 		shost->max_lun = 1;
 		shost->max_channel = 1;
 		shost->max_cmd_len = 32;
+		shost->needs_budget_token = true;
 
 		/* Schedule policy is determined by ->qc_defer()
 		 * callback and it needs to see every deferred qc.
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index e87cf7eadd26..2b3fc8dcbf0b 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -695,6 +695,9 @@ struct Scsi_Host {
 	/* The transport requires the LUN bits NOT to be stored in CDB[1] */
 	unsigned no_scsi2_lun_in_cdb:1;
 
+	/* Whether the LLD uses cmd->budget_token */
+	unsigned needs_budget_token:1;
+
 	/*
 	 * Optional work queue to be utilized by the transport
 	 */

  parent reply	other threads:[~2025-12-16 22:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 22:30 [PATCH v4 0/6] Increase SCSI IOPS Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 1/6] block: Rename busy_tag_iter_fn into blk_mq_rq_iter_fn Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 2/6] block: Introduce __blk_mq_tagset_iter() Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 3/6] block: Introduce blk_mq_tagset_iter() Bart Van Assche
2025-12-16 22:30 ` Bart Van Assche [this message]
2025-12-16 22:30 ` [PATCH v4 5/6] scsi: core: Generalize scsi_device_busy() Bart Van Assche
2025-12-16 22:30 ` [PATCH v4 6/6] scsi: core: Improve IOPS in case of host-wide tags Bart Van Assche
2025-12-17  3:24   ` Damien Le Moal
2025-12-19 17:35     ` Bart Van Assche
2025-12-19 23:06       ` Damien Le Moal
2025-12-20  0:05         ` Bart Van Assche
2025-12-20  0:13           ` Damien Le Moal
2025-12-20  0:28             ` Bart Van Assche

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=20251216223052.350366-5-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=john.g.garry@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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