lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210201123811.GA41955@lothringen>
Date:   Mon, 1 Feb 2021 13:38:11 +0100
From:   Frederic Weisbecker <frederic@...nel.org>
To:     chenshiyan <chenshiyan@...ux.alibaba.com>
Cc:     fweisbec@...il.com, tglx@...utronix.de, mingo@...nel.org,
        torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] nohz: Restart tick before do softirq

Hi,

I'm a bit confused with the changelog, let's try to clarify:

On Mon, Feb 01, 2021 at 11:45:43AM +0800, chenshiyan wrote:
> When the cpu is continuously idle, tick_irq_exit() will count next tick
> expiry

What do you mean by counting next tick expiry here? Is is when
tick_nohz_full_update_tick() reprogramms the next tick?

> with maybe several periodic ticks

you mean that perhaps it's not going to stop it right now?


> but if it enters softirq before next tick

Not sure what you mean here.

> invoke_softirq() is called before tick_irq_exit(),
> there will be no ticks during softirq.

Ok the issue happens when an IRQ fires while the tick is stopped, right?


> So with sched_clock_irqtime
> closing, sirq is very low in nohz idle even if the softirq costs much
> time beause of the sampling ticks missing(sirq will be much higher and
> seem exact if the cpu is busy).

But this only happens when sched_clock() is based on jiffies, right?
Are you working on an architecture that doesn't implement it?

Thanks.

> 
> Signed-off-by: chenshiyan <chenshiyan@...ux.alibaba.com>
> ---
>  kernel/softirq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 9d71046..8f3f71b9 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -210,6 +210,7 @@ static inline void invoke_softirq(void)
>  		return;
>  
>  	if (!force_irqthreads) {
> +		tick_nohz_idle_restart_tick();
>  #ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
>  		/*
>  		 * We can safely execute softirq on the current stack if
> -- 
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ