Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #60932 > unrolled thread
| Started by | wenbinzeng(曾文斌) <wenbinzeng@tencent.com> |
|---|---|
| First post | 2018-05-08 14:50 +0200 |
| Last post | 2018-05-08 14:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.debian.kernel
Bug#898187: linux-image-4.9.0-6-amd64: irq affinity spreading for nvme not activated wenbinzeng(曾文斌) <wenbinzeng@tencent.com> - 2018-05-08 14:50 +0200
| From | wenbinzeng(曾文斌) <wenbinzeng@tencent.com> |
|---|---|
| Date | 2018-05-08 14:50 +0200 |
| Subject | Bug#898187: linux-image-4.9.0-6-amd64: irq affinity spreading for nvme not activated |
| Message-ID | <vNae5-79W-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Package: linux-image-4.9.0-6-amd64
Version: 4.9.0-6-amd64
Debian Linux kernel 4.9.0-6-amd64 automatically spreads NVMe irq affinity among all the CPUs, /proc/irq/n/smp_affinity looks good, but all the softirq still goes to CPU 0 when running IO stress tests. Moreover because IRQD_AFFINITY_MANAGED flag is set, manually writing to /proc/irq/n/smp_affinity will fail like the follows:
# echo 2 > /proc/irq/70/smp_affinity
-bash: echo: write error: Input/output error
I used systemtap to force writing smp_affinity for NVMe irqs, here is what I did:
# stap -g -e 'probe kernel.function("irq_can_set_affinity_usr").return { $return = 1 }'
Then I manually wrote to each of the NVMe's smp_affinity, no errors anymore.
After this, the problem disappeared and the interrupts evenly distributed among all the CPUs during IO stress tests.
I have been looking at the source code and hacked around, but couldn't pinpoint the bug.
I believe this is a bug with 4.9 kernel, I tested upstream 4.9.98, it also had the same problem. But the upstream kernel 4.16.7 had no problem, it worked fine, unfortunately there are so many changes with irq code and nvme code between 4.9 and 4.16.7, I couldn't figure out what code fixed the problem.
Wonder if someone can shed some lights here. Thanks in advance.
发自我的 iPhone
Back to top | Article view | linux.debian.kernel
csiph-web