lkml.org 
[lkml]   [2019]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/3] softirq: implement interrupt flood detection
On Wed, Dec 18, 2019 at 11:49:41AM +0100, Peter Zijlstra wrote:
>
> _If_ you want to do something like this, do it like the below. That only
> adds a few instruction to irq_exit() and only touches a cacheline that's
> already touched.
>
> It computes both the avg duration and the avg inter-arrival-time of
> hardirqs. Things get critical when:
>
> inter-arrival-avg < 2*duration-avg
>
> or something like that.

Better yet, try something like:

bool cpu_irq_heavy(int cpu)
{
return cpu_util_irq(cpu_rq(cpu)) >= arch_scale_cpu_capacity(cpu);
}


\
 
 \ /
  Last update: 2019-12-18 13:31    [W:0.156 / U:5.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site