lkml.org 
[lkml]   [2018]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd context
On Thu, Jan 11, 2018 at 12:46 PM, Dmitry Safonov <dima@arista.com> wrote:
> On Thu, 2018-01-11 at 12:40 -0800, Linus Torvalds wrote:
>> On Thu, Jan 11, 2018 at 12:34 PM, Dmitry Safonov <dima@arista.com>
>> wrote:
>> >
>> > I could try to write a PoC for that..
>> > What should be the trigger to fall into workqueue?
>> > How to tell if there're too many softirqs of the kind?
>>
>> I suspect it would have to be time-based, probably using the
>> scheduler clock.
>
> I thought about this, but I was a bit afraid of how much pricey it
> would be recalculate it each clock. Well, might just try to write that
> and measure the impact.
>
>> Most softirqs are really really small. So just counting them probably
>> isn't all that meaningful, although the count is good as a fallback
>> (as shown by the jiffy issues).
>>
>> The good news is that we only have a fairly small handful of
>> softirqs,
>> so counting/timing them separately is still mainly a pretty small
>> array (which needs to be percpu, of course).

Note that using (scheduler) clock might also help to break net_rx_action()
not on a stupid netdev_budget, but on a more precise time limit as well.

netdev_budget of 300 packets is quite big :/

(The time_limit based on jiffies + 2 does not work on hosts with one
cpu, since jiffies wont make progress while net_rx_action() is
running)

\
 
 \ /
  Last update: 2018-01-14 23:24    [W:0.147 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site