[PATCHv2 2/2] nvme-pci: remove cached shadow doorbell offsets

Keith Busch kbusch at kernel.org
Thu Oct 14 10:49:38 PDT 2021


On Thu, Oct 14, 2021 at 06:09:30PM +0100, John Levon wrote:
> On Thu, Oct 14, 2021 at 09:45:43AM -0700, Keith Busch wrote:
> 
> > And when this feature is in use, the specification requires all queue
> > updates use this mechanism, so don't don't treat the admin queue
> > differently.
> 
> Hi Keith, I think you might have missed the other email from me?
> 
> This would cause implementation difficulties for a controller, right?

If the controller is not maintaining the admin queue shadow, then the
event index will always tell the host to ring the doorbell, right? So
the same host behvaior would ultimately happen.

> Currently we presume that the admin queue's shadow doorbells aren't valid, so
> always look at the BAR0 location. Given we need to support older Linux versions,
> we don't have any non-hacky way to handle this: we'd need something horrible
> that presumes those Linux versions - and any other driver implementations -
> always leave the admin queue shadows at zero, so if we see a non-zero value, it
> must be doing shadow doorbells.
> 
> It's unclear to me what the advantage of fixing this is, given Linux has been
> out of spec for so long.

Ah, I skimmed the part that said we are not up to spec compliance, so
aligning with the spec with any feature usually justifies itself. I see
your point was the opposite :)

I don't consider this part of the patch to all that important, though,
so I can leave the admin queues alone if it's concerning.



More information about the Linux-nvme mailing list