The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>
Subject: Re: [tip: timers/core] tick: Mark sched_timer to expire in hard interrupt context
Date: Wed, 28 Aug 2019 15:48:36 +0200	[thread overview]
Message-ID: <20190828134835.GA11560@lenoir> (raw)
In-Reply-To: <156699021381.13479.1712414321907002833.tip-bot2@tip-bot2>

On Wed, Aug 28, 2019 at 11:03:33AM -0000, tip-bot2 for Sebastian Andrzej Siewior wrote:
> The following commit has been merged into the timers/core branch of tip:
> 
> Commit-ID:     71fed982d63cb2bb88db6f36059e3b14a7913846
> Gitweb:        https://git.kernel.org/tip/71fed982d63cb2bb88db6f36059e3b14a7913846
> Author:        Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> AuthorDate:    Fri, 23 Aug 2019 13:38:45 +02:00
> Committer:     Thomas Gleixner <tglx@linutronix.de>
> CommitterDate: Wed, 28 Aug 2019 13:01:26 +02:00
> 
> tick: Mark sched_timer to expire in hard interrupt context
> 
> sched_timer must be initialized with the _HARD mode suffix to ensure expiry
> in hard interrupt context on RT.
> 
> The previous conversion to HARD expiry mode missed on one instance in
> tick_nohz_switch_to_nohz(). Fix it up.
> 
> Fixes: 902a9f9c50905 ("tick: Mark tick related hrtimers to expiry in hard interrupt context")
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Link: https://lkml.kernel.org/r/20190823113845.12125-3-bigeasy@linutronix.de
> 
> ---
>  kernel/time/tick-sched.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 01ff32a..9558517 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -1233,7 +1233,7 @@ static void tick_nohz_switch_to_nohz(void)
>  	 * Recycle the hrtimer in ts, so we can share the
>  	 * hrtimer_forward with the highres code.
>  	 */
> -	hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
> +	hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);

That said, this instance only uses hrtimer for time computing. The backend is
clockevent directly.

>  	/* Get the next period */
>  	next = tick_init_jiffy_update();
>  

      reply	other threads:[~2019-08-28 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 11:38 [PATCH 0/2] Two missing _HARD annotations for the timer code Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 1/2] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD Sebastian Andrzej Siewior
2019-08-28 11:03   ` [tip: timers/core] " tip-bot2 for Sebastian Andrzej Siewior
2019-08-23 11:38 ` [PATCH 2/2] tick: Mark sched_timer in hard interrupt context Sebastian Andrzej Siewior
2019-08-28 11:03   ` [tip: timers/core] tick: Mark sched_timer to expire " tip-bot2 for Sebastian Andrzej Siewior
2019-08-28 13:48     ` Frederic Weisbecker [this message]

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=20190828134835.GA11560@lenoir \
    --to=frederic@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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