Re: [PATCH net] netlink: call cond_resched after broadcasting updates
From: David Miller <davem@davemloft.net>
Date: 2014-12-31 23:38:40
From: David Miller <davem@davemloft.net>
Date: 2014-12-31 23:38:40
From: Stephen Hemminger <stephen@networkplumber.org> Date: Sat, 27 Dec 2014 09:54:33 -0800
When a netlink event is posted to a socket, the receiving process maybe waiting to wakeup. Reduce the latency by calling cond_resched() in this loop. This reduces the problems with missed events during a netlink storm such as when a routing daemon does mass update in response to a link transition. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
As mentioned by others, this is potentially invoked from software interrupts generating netlink events (one example is ipv6) so we can't try to conditionally sleep here.