Skip to content

IO Queue fixes rewrite

Matthew Wilcox linux-nvme 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest0 of 4 patches 0 repliesNew

Patches in v2 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHv2 0/4] IO Queue fixes rewrite
Quoted 9 lines · Keith Busch

The only patch different in v2 from the previous is the "Per-cpu IO queues". The feedback on using the per cpu variable to point to an index rather than a struct nvme_queue pointer was a great idea!

I only included all 4 in this set because I wanted to make sure they apply cleanly against the new tree.

I also ran sparse this time; I've exceeded my fair share of sparse errors working on this driver. :)

Unfortunately, you missed a CONFIG option to enable checking of __rcu. You need CONFIG_SPARSE_RCU_POINTER=y

With that enabled, I get a bunch of warnings like this:

drivers/block/nvme-core.c:942:48: warning: incorrect type in argument 1 (different address spaces)
drivers/block/nvme-core.c:942:48: expected struct nvme_queue *nvmeq
drivers/block/nvme-core.c:942:48: got struct nvme_queue [noderef] <asn:4>*<noident>
drivers/block/nvme-core.c:948:49: warning: incorrect type in argument 1 (different address spaces)
drivers/block/nvme-core.c:948:49: expected struct nvme_queue *nvmeq
drivers/block/nvme-core.c:948:49: got struct nvme_queue [noderef] <asn:4>*<noident>

The problem is that only the IO queues need to be RCU-protected, but every time we access the admin queue, we get a warning, because clearly there's no way to tell sparse "element 0 of this array isn't RCU protected, only elements 1-n are".

So ... I think I'll just include patch 1 out of this set and send a pull request to Linux today.