public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: "bart.vanassche@sandisk.com" <bart.vanassche@sandisk.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"sreekanth.reddy@broadcom.com" <sreekanth.reddy@broadcom.com>,
	"MPT-FusionLinux.pdl@broadcom.com"
	<MPT-FusionLinux.pdl@broadcom.com>,
	"suganath-prabu.subramani@broadcom.com" 
	<suganath-prabu.subramani@broadcom.com>,
	"hare@suse.de" <hare@suse.de>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: mpt3sas fails to allocate budget_map and detects no devices
Date: Thu, 6 Jan 2022 23:41:33 +0800	[thread overview]
Message-ID: <YdcNrSJJGllQzWOB@T590> (raw)
In-Reply-To: <97be83524e1ee6776a4c1261bf4c1b17a8b75f12.camel@suse.com>

On Thu, Jan 06, 2022 at 03:22:53PM +0000, Martin Wilck wrote:
> On Thu, 2022-01-06 at 23:00 +0800, Ming Lei wrote:
> > On Thu, Jan 06, 2022 at 10:26:01AM +0000, Martin Wilck wrote:
> > 
> > > 
> > > Alternatively, we could inhibit increasing the device queue depth
> > > above
> > > a certain multiple of cmd_per_lun, and size the sbitmap by that
> > > limit.
> > > My gut feeling says that if cmd_per_lun == 7, it makes sense to use
> > > a
> > > limit of 32. That way the bitmap would fit into 2 pages; we'd still
> > > waste a lot, but it wouldn't matter much in absolute numbers. 
> > > Thus we could forbid increasing the queue depth to more than the
> > > power
> > > of 2 above 4*cmd_per_lun. Does this make sense?
> > 
> > I'd suggest to fix mpt3sas for avoiding this memory waste.
> 
> Let's wait for Sreekanth's comment on that.
> 
> mpt3sas is not the only driver using a low value. Qlogic drivers set
> cmd_per_lun=3, for example (with 3, our logic would use shift=6, so the
> issue I observed wouldn't occur - but it would be prone to cache line
> bouncing).

But qlogic has smaller .can_queue which looks at most 512, .can_queue is
the depth for allocating sbitmap, since each sdev->queue_depth is <=
.can_queue.

> 
> > > (*) this calculation ignores the use of sb->map[i].depth. Taking it
> > > into account wouldn't change much.
> > 
> > Yeah, I have actually one patch to remove sb->map[].depth, which can
> > reduce each map's size by 1/3.
> 
> That sounds like a great idea to me. I've also been wondering whether

I will post the patch after running some benchmark to make sure no
performance regression.

> it wouldn't be possible to use more than a single word in a cache line
> (given a high-enough number of cache lines).

It seems possible to use more than one single word in one map in case
that depth is high enough, so it is still nothing to with this case.


Thanks,
Ming


  reply	other threads:[~2022-01-06 15:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 18:00 mpt3sas fails to allocate budget_map and detects no devices Martin Wilck
2022-01-06  3:03 ` Ming Lei
2022-01-06  3:17   ` Martin K. Petersen
2022-01-06 10:26   ` Martin Wilck
2022-01-06 15:00     ` Ming Lei
2022-01-06 15:22       ` Martin Wilck
2022-01-06 15:41         ` Ming Lei [this message]
2022-01-06 16:19           ` Martin Wilck
2022-01-06 16:33             ` Ming Lei
2022-01-10  2:59               ` Ming Lei
2022-01-12 16:59                 ` Martin Wilck
2022-01-25 16:29                   ` Martin Wilck
2022-01-26  1:25                     ` Ming Lei

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=YdcNrSJJGllQzWOB@T590 \
    --to=ming.lei@redhat.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=martin.wilck@suse.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.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