kernel: fix warning on retrying page pool release
Fixes the following warning: [ 180.314652] NOHZ tick-stop error: local softirq work is pending, handler #08!!! Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
ca51f7aaf5
commit
610dd871aa
1 changed files with 8 additions and 3 deletions
|
@ -16,16 +16,17 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/net/core/page_pool.c
|
--- a/net/core/page_pool.c
|
||||||
+++ b/net/core/page_pool.c
|
+++ b/net/core/page_pool.c
|
||||||
@@ -873,7 +873,7 @@ static void page_pool_release_retry(stru
|
@@ -873,7 +873,8 @@ static void page_pool_release_retry(stru
|
||||||
{
|
{
|
||||||
struct delayed_work *dwq = to_delayed_work(wq);
|
struct delayed_work *dwq = to_delayed_work(wq);
|
||||||
struct page_pool *pool = container_of(dwq, typeof(*pool), release_dw);
|
struct page_pool *pool = container_of(dwq, typeof(*pool), release_dw);
|
||||||
- int inflight;
|
- int inflight;
|
||||||
|
+ unsigned long flags;
|
||||||
+ int cpu, inflight;
|
+ int cpu, inflight;
|
||||||
|
|
||||||
inflight = page_pool_release(pool);
|
inflight = page_pool_release(pool);
|
||||||
/* In rare cases, a driver bug may cause inflight to go negative.
|
/* In rare cases, a driver bug may cause inflight to go negative.
|
||||||
@@ -885,6 +885,17 @@ static void page_pool_release_retry(stru
|
@@ -885,6 +886,21 @@ static void page_pool_release_retry(stru
|
||||||
if (inflight <= 0)
|
if (inflight <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -33,12 +34,16 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
+ * defer_list that can stay in the list until we have enough queued
|
+ * defer_list that can stay in the list until we have enough queued
|
||||||
+ * traffic.
|
+ * traffic.
|
||||||
+ */
|
+ */
|
||||||
|
+ local_irq_save(flags);
|
||||||
+ for_each_online_cpu(cpu) {
|
+ for_each_online_cpu(cpu) {
|
||||||
+ struct softnet_data *sd = &per_cpu(softnet_data, cpu);
|
+ struct softnet_data *sd = &per_cpu(softnet_data, cpu);
|
||||||
+
|
+
|
||||||
+ if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1))
|
+ if (cpu == raw_smp_processor_id())
|
||||||
|
+ raise_softirq_irqoff(NET_RX_SOFTIRQ);
|
||||||
|
+ else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1))
|
||||||
+ smp_call_function_single_async(cpu, &sd->defer_csd);
|
+ smp_call_function_single_async(cpu, &sd->defer_csd);
|
||||||
+ }
|
+ }
|
||||||
|
+ local_irq_restore(flags);
|
||||||
+
|
+
|
||||||
/* Periodic warning */
|
/* Periodic warning */
|
||||||
if (time_after_eq(jiffies, pool->defer_warn)) {
|
if (time_after_eq(jiffies, pool->defer_warn)) {
|
||||||
|
|
Loading…
Reference in a new issue