[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191218122922.GR2871@hirez.programming.kicks-ass.net>
Date: Wed, 18 Dec 2019 13:29:22 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Ming Lei <ming.lei@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Jens Axboe <axboe@...nel.dk>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
Long Li <longli@...rosoft.com>, Ingo Molnar <mingo@...hat.com>,
Christoph Hellwig <hch@....de>,
Keith Busch <keith.busch@...el.com>,
Sagi Grimberg <sagi@...mberg.me>,
John Garry <john.garry@...wei.com>,
Hannes Reinecke <hare@...e.com>
Subject: Re: [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);
}
Powered by blists - more mailing lists