From: Frederic Weisbecker <frederic@kernel.org>
To: chenshiyan <chenshiyan@linux.alibaba.com>
Cc: fweisbec@gmail.com, tglx@linutronix.de, mingo@kernel.org,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] nohz: Restart tick before do softirq
Date: Mon, 1 Feb 2021 13:38:11 +0100 [thread overview]
Message-ID: <20210201123811.GA41955@lothringen> (raw)
In-Reply-To: <1612151143-72242-1-git-send-email-chenshiyan@linux.alibaba.com>
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@linux.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
>
next prev parent reply other threads:[~2021-02-01 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 3:45 [PATCH RESEND] nohz: Restart tick before do softirq chenshiyan
2021-02-01 12:38 ` Frederic Weisbecker [this message]
2021-02-03 13:04 ` chenshiyan
2021-02-03 13:11 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210201123811.GA41955@lothringen \
--to=frederic@kernel.org \
--cc=chenshiyan@linux.alibaba.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).