[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjVw9=Hio5pRfGW45+yL-geWfNGyPeSFess3FAZQwVJrg@mail.gmail.com>
Date: Sat, 24 Dec 2022 08:56:23 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Hugh Dickins <hughd@...gle.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Keith Busch <kbusch@...nel.org>,
Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <kch@...dia.com>,
Thorsten Leemhuis <regressions@...mhuis.info>,
linux-block@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: 6.2 nvme-pci: something wrong
On Sat, Dec 24, 2022 at 2:19 AM Hugh Dickins <hughd@...gle.com> wrote:
>
> Regarding the awful 0's based queue depth: yes, it just looked to me
> as if the way that got handled in pci.c before differed from the way
> it gets handled in pci.c and core.c now, one too many "+ 1"s or "- 1"s
> somewhere.
The commit in question seems to replace nvme_pci_alloc_tag_set() calls
with nvme_alloc_io_tag_set(), and that has a big difference in how
queue_depth is set.
It used to do (in nnvme_pci_alloc_tag_set()):
set->queue_depth = min_t(unsigned, dev->q_depth, BLK_MQ_MAX_DEPTH) - 1;
but now it does (in nvme_alloc_io_tag_set())
set->queue_depth = ctrl->sqsize + 1;
instead.
So that "set->queue_depth" _seems_ to have historically had that "-1"
(that "zero means one" that apparently sqsize also has), but the new
code basically undoes it.
I don't know the code at all, but this does all seem to be a change
(and *very* confusing).
The fact that Hugh gets it to work by doint that
set->queue_depth = ctrl->sqsize;
does seem to match the whole "it used to subtract one" behavior it
had. Which is why I assume Hugh tried that patch in the first place.
Linus
Powered by blists - more mailing lists