From 502650e09dd95d79ddbe24419409f7ef93818157 Mon Sep 17 00:00:00 2001 From: Abhimanyu Date: Wed, 21 Oct 2015 10:12:32 +0530 Subject: net, rt: limit net_rx napi calls in threaded ISR context -In a PREEMPT_RT with CONFIG_PREEMPT_RT_FULL configuration enabled, some of Interrupt Handler runs in context of threaded ISR. And if this threaded ISR raises a particular softirq, then that calls __raise_softirq_irqoff() function which mark the softirq ready to be executed while exiting ISR in context of ISR only. -So, net_rx_action() function is called in context of threaded ISR if NET_RX_SOFTIRQ softirq is raised by that particular ISR. -net_rx_action is balancing scheduling among napis by using time-out of 2 jiffies for particular napi. On timeout , it calls __raise_softirq_irqoff(). -In case of RT kernel, __raise_softirq_irqoff() again makes the NET_RX_SOFTIRQ ready. So it is called again and again until the packet ring is emptied.This creats a starvation condition for other threads. -This patch removes calling __raise_softirq_irqoff() again while exiting net_rx_action() Signed-off-by: Priyanka Jain Signed-off-by: Abhimanyu diff --git a/net/core/dev.c b/net/core/dev.c index 647ec24..402b7ce 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4445,7 +4445,9 @@ out: softnet_break: sd->time_squeeze++; +#ifndef CONFIG_PREEMPT_RT_FULL __raise_softirq_irqoff(NET_RX_SOFTIRQ); +#endif goto out; } -- cgit v0.10.2