All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: dgilbert@interlog.com,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: RFC: split struct scsi_device in two
Date: Thu, 4 Jun 2020 18:15:57 +0200	[thread overview]
Message-ID: <ff06002f-6615-6ce7-8a23-994555e7e6f5@suse.de> (raw)
In-Reply-To: <5bcc1fee-e221-e54a-d754-d04a2e6fda33@interlog.com>

On 6/4/20 6:08 PM, Douglas Gilbert wrote:
> The scsi_device structure seems to be carrying around a lot of baggage.
> Assuming the object needs to be present on the SCSI fast path then
> making it smaller will help in fitting one or several of them in cache
> lines.
> 
> Now the effort to use xarrays is helping, but only in the order 32 bytes
> at the moment. Currently we have pointers to the standard inquiry response
> and several VPD pages with more VPD pages to come, I suspect.
> 
> So what about having a secondary scsi_device object (with a more
> descriptive name) for all those parts of the currect scsi_device
> object that aren't needed for the fast path? The secondary object
> could be created in scsi_alloc_sdev() and pointed to by the
> primary object (and vice versa). Then adding more context info
> (e.g. more VPD pages) will not burden the fast path.
> 
> sizeof(struct scsi_device)=1976 bytes!
> 
> Comments?
> 
Not sure if that's worth it.

What is far more pressing is a _real_ scsi device rescan, ie the 
possibility of the scsi device changing its inquiry data upon rescan.
At this time the inquiry data is essentially frozen, and the only way to 
handle this is to remove the device and rescan everything
(scsi-rescan-bus.sh -r ...).
It would far better if we could just issue a rescan and the scsi core 
would detect the change internally without the need to recreate the 
object itself.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@suse.de                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

      reply	other threads:[~2020-06-04 16:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 16:08 RFC: split struct scsi_device in two Douglas Gilbert
2020-06-04 16:15 ` Hannes Reinecke [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=ff06002f-6615-6ce7-8a23-994555e7e6f5@suse.de \
    --to=hare@suse.de \
    --cc=dgilbert@interlog.com \
    --cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.