lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 0/3] softirq: Introduce softirq throttling
    On Wed, Apr 06, 2022 at 10:52:38AM +0800, Liao Chang wrote:
    > Kernel check for pending softirqs periodically, they are performed in a
    > few points of kernel code, such as irq_exit() and __local_bh_enable_ip(),
    > softirqs that have been activated by a given CPU must be executed on the
    > same CPU, this characteristic of softirq is always a potentially
    > "dangerous" operation, because one CPU might be end up very busy while
    > the other are most idle.
    >
    > Above concern is proven in a networking user case: recenlty, we
    > engineer find out the time used for connection re-establishment on
    > kernel v5.10 is 300 times larger than v4.19, meanwhile, softirq
    > monopolize almost 99% of CPU. This problem stem from that the connection
    > between Sender and Receiver node get lost, the NIC driver on Sender node
    > will keep raising NET_TX softirq before connection recovery. The system
    > log show that most of softirq is performed from __local_bh_enable_ip(),
    > since __local_bh_enable_ip is used widley in kernel code, it is very
    > easy to run out most of CPU, and the user-mode application can't obtain
    > enough CPU cycles to establish connection as soon as possible.

    Shouldn't you fix that bug instead? This seems like papering over the
    bad effects of a bug and would make it harder to find bugs like this in
    the future. Essentially, it's the same as a screaming hardware interrupt,
    except that it's a software interrupt, so we can fix the bug instead of
    working around broken hardware.

    \
     
     \ /
      Last update: 2022-04-06 18:57    [W:5.094 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site