igb: fix netpoll exit with traffic
Subsystems (3)
PATCH v2 1/1 igb: fix netpoll exit with traffic
Oleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155 netpoll_poll_dev+0x18a/0x1a0
As Alex suggested, change the driver to return work_done at the exit of napi_poll, which should be safe to do in this driver because it is not polling multiple queues in this single napi context (multiple queues attached to one MSI-X vector). Several other drivers contain the same simple sequence, so I hope this will not create new problems.
---
COMPILE TESTED ONLY! I have no way to reproduce this even on a machine I have with igb. It works fine to load the igb driver and netconsole with no errors.
---
v2: simplified patch with an attempt to make it work
v1: original patch that apparently didn't work
--- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igb/igb_main.c +1 -1
@@ -8104,7 +8104,7 @@ static int igb_poll(struct napi_struct *napi, int budget)if (likely (napi_complete_done (napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }/**
Signature · 1 line
2.33.1
Quoted 11 lines
-----Original Message-----
From: Jesse Brandeburg <[email protected]>
Sent: Tuesday, November 23, 2021 10:40 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Jesse Brandeburg <[email protected]>; netdev at vger.kernel.org; Oleksandr Natalenko <[email protected]>; Danielle Ratson <[email protected]>; Alexander Duyck <[email protected]>
Subject: [PATCH net v2] igb: fix netpoll exit with traffic
Quoted 4 lines
Oleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
Hi Jessi,
Ill run tests with you patch and give you results for if it is ok. Thanks!
Quoted 46 lines
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155 netpoll_poll_dev+0x18a/0x1a0As Alex suggested, change the driver to return
work_doneat the exit ofnapi_poll, which should be safe to do in this driver because it is not polling multiple queues in this single napi context (multiple queues attached to one MSI-X vector). Several other drivers contain the same simple sequence, so I hope this will not create new problems.Fixes 16eb8815c235 ("igb: Refactor clean_rx_irq to reduce overhead andimprove performance")
Reported-by Oleksandr Natalenko <[email protected]>Reported-by Danielle Ratson <[email protected]>Suggested-by Alexander Duyck <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>---
COMPILE TESTED ONLY! I have no way to reproduce this even on a machine I have with igb. It works fine to load the igb driver and netconsole with no errors.
---
v2: simplified patch with an attempt to make it work
v1: original patch that apparently didn't work--- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igb/igb_main.c +1
-1@@ -8104,7 +8104,7 @@ static int igb_poll(struct napi_struct *napi, int budget)if (likely (napi_complete_done (napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }/**
--
2.33.1
Quoted 10 lines
Quoted 10 lines
From: Jesse Brandeburg <[email protected]>
Sent: Tuesday, November 23, 2021 10:40 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Jesse Brandeburg <[email protected]>; netdev at vger.kernel.org; Oleksandr Natalenko <[email protected]>; Danielle Ratson <[email protected]>; Alexander Duyck <[email protected]>
Subject: [PATCH net v2] igb: fix netpoll exit with traffic
Quoted 4 lines
Quoted 4 lines
Oleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
And also:
WARNING: 'occuring' may be misspelled - perhaps 'occurring'? #9:
Danielle brought this back up as still occuring, so we'll try
^^^^^^^^
total: 0 errors, 1 warnings, 0 checks, 8 lines checked
Please Reword.
Quoted 53 lines
Hi Jessi,
Ill run tests with you patch and give you results for if it is ok. Thanks!
Quoted 47 lines
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155 netpoll_poll_dev+0x18a/0x1a0As Alex suggested, change the driver to return
work_doneat the exit ofnapi_poll, which should be safe to do in this driver because it is not polling multiple queues in this single napi context (multiple queues attached to one MSI-X vector). Several other drivers contain the same simple sequence, so I hope this will not create new problems.Fixes 16eb8815c235 ("igb: Refactor clean_rx_irq to reduce overheadand improve performance")
Reported-by Oleksandr Natalenko <[email protected]>Reported-by Danielle Ratson <[email protected]>Suggested-by Alexander Duyck <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>---
COMPILE TESTED ONLY! I have no way to reproduce this even on a machine I have with igb. It works fine to load the igb driver and netconsole with no errors.
---
v2: simplified patch with an attempt to make it work
v1: original patch that apparently didn't work--- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igb/igb_main.c +0
-0@@ -8104,7 +8104,7 @@ static int igb_poll(struct napi_struct *napi,int
budget)drivers/net/ethernet/intel/igb/igb_main.c +1
-2if (likely (napi_complete_done (napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }/** -- 2.33.1
drivers/net/ethernet/intel/igb/igb_main.c static int igb_poll(struct napi_struct *napi, int budget) · line 8107
Quoted 5 lines · Jesse Brandeburg
Oleksandr brought a bug report where netpoll causes trace messages in the log on igb.
---drivers/net/ethernet/intel/igb/igb_main.c +1
-1-return min (work_done, budget -1 ); +return work_done;
I am able to reproduce the WARNING + stack trace at will.? It occurs on every boot.
Please see https://bugzilla.kernel.org/show_bug.cgi?id=212573 for details.
I have tested the simple patch (v2) against both kernels 5.14 and 5.15, and am happy to report that this fixes the issue for me.
Kris
Hello.
Quoted 41 lines · On ?ter? 23. listopadu 2021 21:40:00 CET Jesse Brandeburg wrote:
Oleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155
netpoll_poll_dev+0x18a/0x1a0As Alex suggested, change the driver to return
work_doneat the exit ofnapi_poll, which should be safe to do in this driver because it is not polling multiple queues in this single napi context (multiple queues attached to one MSI-X vector). Several other drivers contain the same simple sequence, so I hope this will not create new problems.Fixes 16eb8815c235 ("igb: Refactor clean_rx_irq to reduce overhead andimprove performance") Reported-by: Oleksandr Natalenko <[email protected]>
Reported-by Danielle Ratson <[email protected]>Suggested-by Alexander Duyck <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>---
COMPILE TESTED ONLY! I have no way to reproduce this even on a machine I have with igb. It works fine to load the igb driver and netconsole with no errors.
---
v2: simplified patch with an attempt to make it work
v1: original patch that apparently didn't work--- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/net/ethernet/intel/igb/igb_main.cindexe647cc89c239..5e24b7ce5a92100644
drivers/net/ethernet/intel/igb/igb_main.c static int igb_poll(struct napi_struct *napi, int · line 8110
Quoted 8 lines
drivers/net/ethernet/intel/igb/igb_main.c +1
-1@@ -8104,7 +8104,7 @@ static int igb_poll(struct napi_struct *napi, int budget) if (likely(napi_complete_done(napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }/**
This seems to address the issue for me. I do not see a warning after a couple of suspend/resume cycles any more, while previously it occurred after the first cycle.
Thanks!
Signature · 1 line
Oleksandr Natalenko (post-factum)
Quoted 59 lines
-----Original Message-----
From: Jesse Brandeburg <[email protected]>
Sent: Tuesday, November 23, 2021 10:40 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Jesse Brandeburg <[email protected]>; netdev at vger.kernel.org; Oleksandr Natalenko <[email protected]>; Danielle Ratson <[email protected]>; Alexander Duyck <[email protected]>
Subject: [PATCH net v2] igb: fix netpoll exit with trafficOleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155 netpoll_poll_dev+0x18a/0x1a0As Alex suggested, change the driver to return
work_doneat the exit ofnapi_poll, which should be safe to do in this driver because it is not polling multiple queues in this single napi context (multiple queues attached to one MSI-X vector). Several other drivers contain the same simple sequence, so I hope this will not create new problems.Fixes 16eb8815c235 ("igb: Refactor clean_rx_irq to reduce overhead andimprove performance")
Reported-by Oleksandr Natalenko <[email protected]>Reported-by Danielle Ratson <[email protected]>Suggested-by Alexander Duyck <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>---
COMPILE TESTED ONLY! I have no way to reproduce this even on a machine I have with igb. It works fine to load the igb driver and netconsole with no errors.
---
v2: simplified patch with an attempt to make it work
v1: original patch that apparently didn't work--- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igb/igb_main.c +1
-1@@ -8104,7 +8104,7 @@ static int igb_poll(struct napi_struct *napi, int budget)if (likely (napi_complete_done (napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }
Quoted 3 lines
/**
--
2.33.1
Tested and looks ok, thanks!
Danielle Ratson
Tested-byQuoted 72 lines
-----Original Message-----
From: Danielle Ratson
Sent: Thursday, November 25, 2021 9:37 AM
To: Jesse Brandeburg <[email protected]>; intel-wired- lan at lists.osuosl.org
Cc: netdev at vger.kernel.org; Oleksandr Natalenko <[email protected]>; Alexander Duyck <[email protected]>
Subject: RE: [PATCH net v2] igb: fix netpoll exit with trafficQuoted 58 lines
-----Original Message-----
From: Jesse Brandeburg <[email protected]>
Sent: Tuesday, November 23, 2021 10:40 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Jesse Brandeburg <[email protected]>; netdev at vger.kernel.org; Oleksandr Natalenko <[email protected]>; Danielle Ratson <[email protected]>; Alexander Duyck <[email protected]>
Subject: [PATCH net v2] igb: fix netpoll exit with trafficOleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155 netpoll_poll_dev+0x18a/0x1a0As Alex suggested, change the driver to return
work_doneat the exit ofnapi_poll, which should be safe to do in this driver because it is not polling multiple queues in this single napi context (multiple queues attached to one MSI-X vector). Several other drivers contain the same simple sequence, so I hope this will not create new problems.Fixes 16eb8815c235 ("igb: Refactor clean_rx_irq to reduce overheadand improve performance")
Reported-by Oleksandr Natalenko <[email protected]>Reported-by Danielle Ratson <[email protected]>Suggested-by Alexander Duyck <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>---
COMPILE TESTED ONLY! I have no way to reproduce this even on a machine I have with igb. It works fine to load the igb driver and netconsole with no errors.
---
v2: simplified patch with an attempt to make it work
v1: original patch that apparently didn't work--- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igb/igb_main.c +0
-0@@ -8104,7 +8104,7 @@ static int igb_poll(struct napi_struct *napi,int
budget)drivers/net/ethernet/intel/igb/igb_main.c +1
-1if (likely (napi_complete_done (napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }
Quoted 5 lines
Quoted 3 lines
/**
--
2.33.1Tested and looks ok, thanks!
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Tue, 23 Nov 2021 12:40:00 -0800 you wrote:
Oleksandr brought a bug report where netpoll causes trace messages in the log on igb.
Danielle brought this back up as still occuring, so we'll try again.
[22038.710800] ------------[ cut here ]------------ [22038.710801] igb_poll+0x0/0x1440 [igb] exceeded budget in poll [22038.710802] WARNING: CPU: 12 PID: 40362 at net/core/netpoll.c:155 netpoll_poll_dev+0x18a/0x1a0[...]
Here is the summary with links:
- [net,v2] igb: fix netpoll exit with traffic
https://git.kernel.org/netdev/net/c/eaeace60778e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html