Skip to content

bdev/nvme: fix GPT examination hang in interrupt mode#65

Merged
derekbit merged 1 commit into
longhorn:longhorn-v25.05from
c3y1huang:11816-nvme-driver-interrup-mode-support-with-drivers
Oct 21, 2025
Merged

bdev/nvme: fix GPT examination hang in interrupt mode#65
derekbit merged 1 commit into
longhorn:longhorn-v25.05from
c3y1huang:11816-nvme-driver-interrup-mode-support-with-drivers

Conversation

@c3y1huang

Copy link
Copy Markdown

Which issue(s) this PR fixes:

Issue longhorn/longhorn#11816

What this PR does / why we need it:

  • Remove the dependency on global transport type (g_nvme_trtype).
  • In interrupt mode, always enable periodic polling so TCP qpairs can process send/receive queues and complete I/O.

Special notes for your reviewer:

Additional documentation or context

@mcerveny

mcerveny commented Oct 6, 2025

Copy link
Copy Markdown

dead code ?

period = spdk_interrupt_mode_is_enabled() ? 100 : g_opts.nvme_ioq_poll_period_us;
....
if (spdk_interrupt_mode_is_enabled() && period == 0) {

@c3y1huang

c3y1huang commented Oct 7, 2025

Copy link
Copy Markdown
Author

dead code ?

period = spdk_interrupt_mode_is_enabled() ? 100 : g_opts.nvme_ioq_poll_period_us;
....
if (spdk_interrupt_mode_is_enabled() && period == 0) {

Keeping the upstream logics so we don't have to add it back later for longhorn/longhorn#11662.

Comment thread module/bdev/nvme/bdev_nvme.c Outdated
* incompatible with interrupt mode polling.
*/
if (spdk_interrupt_mode_is_enabled() && g_nvme_trtype != SPDK_NVME_TRANSPORT_TCP) {
if (spdk_interrupt_mode_is_enabled() && period == 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what situation is the period zero?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won’t reach this logic, but keeping it to keep the original upstream logic visible for later.
#65 (comment)

@c3y1huang
c3y1huang force-pushed the 11816-nvme-driver-interrup-mode-support-with-drivers branch from 11657de to b1069f7 Compare October 21, 2025 02:25
- Remove the dependency on global transport type (g_nvme_trtype).
- In interrupt mode, always enable periodic polling so TCP qpairs
  can process send/receive queues and complete I/O.

longhorn/longhorn-11816

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
@c3y1huang
c3y1huang force-pushed the 11816-nvme-driver-interrup-mode-support-with-drivers branch from b1069f7 to 258cf4d Compare October 21, 2025 02:29
@c3y1huang
c3y1huang requested a review from derekbit October 21, 2025 02:29

@derekbit derekbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekbit
derekbit merged commit 5574f2d into longhorn:longhorn-v25.05 Oct 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants