Linux USB
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>,
	James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-usb@vger.kernel.org,
	John Garry <john.garry@linux.dev>
Subject: Re: [PATCH v2] scsi: core: Drop Scsi_Host.default_lock
Date: Fri, 7 Aug 2026 09:18:24 +0100	[thread overview]
Message-ID: <a5ea45d9-2a94-4b3c-8f31-d6bb22dc6eee@oracle.com> (raw)
In-Reply-To: <9d9092bc-6bf0-4afb-9d1a-5ee16c9c501e@acm.org>


> 
> On 8/6/26 4:39 AM, John Garry wrote:
>    > Getting the address of embedded host_lock structure just requires adding
>    > a fixed offset value to the shost pointer. However, getting the value of
>    > the host_lock pointer requires loading from a fixed offset to the shost
>    > pointer. The latter should be very slightly slower, which is relevant as
>    > this lock is used a lot throughout the core code and drivers.
> 
> Hmm ... SCSI drivers for which performance matters shouldn't use the
> SCSI host lock in their hot path.

Any driver which uses DEF_SCSI_QCMD uses this lock in the fastpath. 
However I don't think that many are high performance HBAs. Maybe 
usb/storage/ or pmcraid could be consider higher performing.

Then there is stuff like xen-scsifront.c which uses this lock in the cmd 
done handler. It's used a lot in lpfc and also in code which looks to be 
fastpath...but that drivers is very complex.

> 
>    > @Bart, Can you kindly build test this? s390 and sh were causing some
> build
>    > issues for me. Thanks
> 
> This patch passes my build tests, but an update for the references to
> default_lock in the Documentation/ directory is missing.

I'll fix it

> 
> Otherwise this patch looks good to me. So with or without the
> Documentation/ update, feel free to add:
> 
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> 

thanks


      reply	other threads:[~2026-08-07  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 11:39 [PATCH v2] scsi: core: Drop Scsi_Host.default_lock John Garry
2026-08-06 16:30 ` Damien Le Moal
2026-08-06 17:15 ` Bart Van Assche
2026-08-07  8:18   ` John Garry [this message]

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=a5ea45d9-2a94-4b3c-8f31-d6bb22dc6eee@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bvanassche@acm.org \
    --cc=john.garry@linux.dev \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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