* nvme interrupt counters got reset after suspend/resume
@ 2025-03-19 15:39 David Wang
2025-03-19 15:57 ` Keith Busch
0 siblings, 1 reply; 3+ messages in thread
From: David Wang @ 2025-03-19 15:39 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme, linux-kernel
Hi,
I noticed that on my system, the counters from /proc/interrupts
for nvme got reset after I suspend and then resume the system.
For example, before `systemctl suspend`:
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
...
38: 0 0 0 22 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 0-edge nvme0q0
39: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:22:00.0 0-edge enp34s0
40: 78 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 1-edge nvme0q1
41: 0 147 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 2-edge nvme0q2
42: 0 0 13 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 3-edge nvme0q3
43: 0 0 0 9 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 4-edge nvme0q4
44: 0 0 0 0 87 0 0 0 IR-PCI-MSIX-0000:25:00.0 5-edge nvme0q5
45: 0 0 0 0 0 112 0 0 IR-PCI-MSIX-0000:25:00.0 6-edge nvme0q6
46: 0 0 0 0 0 0 12 0 IR-PCI-MSIX-0000:25:00.0 7-edge nvme0q7
47: 0 0 0 0 0 0 0 8 IR-PCI-MSIX-0000:25:00.0 8-edge nvme0q8
And right after resume the system, values are reset to 0s:
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
...
38: 0 0 0 21 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 0-edge nvme0q0
39: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:22:00.0 0-edge enp34s0
40: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 1-edge nvme0q1
41: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 2-edge nvme0q2
42: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 3-edge nvme0q3
43: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 4-edge nvme0q4
44: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 5-edge nvme0q5
45: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 6-edge nvme0q6
46: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 7-edge nvme0q7
47: 0 0 0 0 0 0 0 0 IR-PCI-MSIX-0000:25:00.0 8-edge nvme0q8
This does not happend to counters for other interrupts on my system.
Not sure whether this is designed explicitly this way, or happended to be this way to make suspend/resume work,
or there is some bug behind this.
Just bring this up for discussion since I failed to find any discussion about it.
Thanks
David.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: nvme interrupt counters got reset after suspend/resume
2025-03-19 15:39 nvme interrupt counters got reset after suspend/resume David Wang
@ 2025-03-19 15:57 ` Keith Busch
2025-03-19 16:23 ` David Wang
0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2025-03-19 15:57 UTC (permalink / raw)
To: David Wang; +Cc: axboe, hch, sagi, linux-nvme, linux-kernel
On Wed, Mar 19, 2025 at 11:39:10PM +0800, David Wang wrote:
>
> This does not happend to counters for other interrupts on my system.
> Not sure whether this is designed explicitly this way, or happended to be this way to make suspend/resume work,
> or there is some bug behind this.
The nvme driver completely brings down the interrupts on suspend and
creates new ones on resume. They might have the same numbers and labels
on the other side of the resume, but they're not from the same original
allocation that tracks these stats. Hope that helps.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nvme interrupt counters got reset after suspend/resume
2025-03-19 15:57 ` Keith Busch
@ 2025-03-19 16:23 ` David Wang
0 siblings, 0 replies; 3+ messages in thread
From: David Wang @ 2025-03-19 16:23 UTC (permalink / raw)
To: Keith Busch; +Cc: axboe, hch, sagi, linux-nvme, linux-kernel
Hi,
At 2025-03-19 23:57:44, "Keith Busch" <kbusch@kernel.org> wrote:
>On Wed, Mar 19, 2025 at 11:39:10PM +0800, David Wang wrote:
>>
>> This does not happend to counters for other interrupts on my system.
>> Not sure whether this is designed explicitly this way, or happended to be this way to make suspend/resume work,
>> or there is some bug behind this.
>
>The nvme driver completely brings down the interrupts on suspend and
>creates new ones on resume. They might have the same numbers and labels
>on the other side of the resume, but they're not from the same original
>allocation that tracks these stats. Hope that helps.
Copy that~! And thanks for clearing things out.
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-19 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 15:39 nvme interrupt counters got reset after suspend/resume David Wang
2025-03-19 15:57 ` Keith Busch
2025-03-19 16:23 ` David Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox