Repository navigation
Conversation
Author
|
Upstream branch: de52810 |
blk_mq_alloc_request_hctx() picks the first online CPU in hctx->cpumask to find a software context for the request. If no CPU in the mask is online, allocation fails with -EXDEV. This triggers in two scenarios: 1. Commit 20e4d81 ("blk-mq: simplify queue mapping & schedule with each possisble CPU") maps all possible CPUs to hardware contexts. If certain CPUs are offline (e.g. booted with maxcpus= or offlined via sysfs), a hardware context may end up mapped entirely to offline CPUs. 2. Commit a46c270 ("blk-mq: don't schedule block kworker on isolated CPUs") strips isolated CPUs from hctx->cpumask. If an hctx is mapped exclusively to isolated CPUs (isolcpus=domain or an isolated cpuset partition), hctx->cpumask ends up empty. NVMe fabrics transports allocate the Connect command for each I/O queue using blk_mq_alloc_request_hctx(). If an hctx only maps offline or isolated CPUs, connecting to the controller fails. Skipping these queues is not an option because isolated CPUs still submit I/O through them, as will offline CPUs once brought online. Passthrough requests bypass the software staging queues and dispatch directly. For these requests, the software context only serves to pick a completion CPU and provide a hint when releasing the tag. Fall back to an online housekeeping CPU's software context when allocating passthrough requests on an hctx without an online CPU in its mask. Hardware contexts whose last online CPU went offline are inactive. blk-mq drained them for the CPU offline, so allocations on them still fail. Fixes: 20e4d81 ("blk-mq: simplify queue mapping & schedule with each possisble CPU") Fixes: a46c270 ("blk-mq: don't schedule block kworker on isolated CPUs") Tested-by: Maurizio Lombardi <mlombard@redhat.com> Reviewed-by: Aaron Tomlin <atomlin@atomlin.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Daniel Wagner <dwagner@suse.de>
Author
|
Upstream branch: de52810 |
ghost
force-pushed
the
series/1201857=>for-next
branch
from
November 10, 2026 10:24
83b0a04 to
84517e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: blk-mq: allow passthrough requests on hctxs without online CPUs
version: 3
url: https://patchwork.kernel.org/series/1201857/