All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] sched: Switch wait_task_inactive to HRTIMER_MODE_REL_HARD
Date: Thu, 26 Aug 2021 19:14:06 +0200	[thread overview]
Message-ID: <YSfL3vdbuXWvI/Ya@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210826170408.vm7rlj7odslshwch@linutronix.de>

On Thu, Aug 26, 2021 at 07:04:08PM +0200, Sebastian Andrzej Siewior wrote:
> With PREEMPT_RT enabled all hrtimers callbacks will be invoked in
> softirq mode unless they are explicitly marked as HRTIMER_MODE_HARD.
> During boot kthread_bind() is used for the creation of per-CPU threads
> and then hangs in wait_task_inactive() if the ksoftirqd is not
> yet up and running.
> The hang disappeared since commit
>    26c7295be0c5e ("kthread: Do not preempt current task if it is going to call schedule()")
> 
> but enabling function trace on boot reliably leads to the freeze on boot
> behaviour again.
> The timer in wait_task_inactive() can not be directly used by a user
> interface to abuse it and create a mass wake up of several tasks at the
> same time leading to long sections with disabled interrupts.
> Therefore it is safe to make the timer HRTIMER_MODE_REL_HARD.
> 
> Switch the timer to HRTIMER_MODE_REL_HARD.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Thanks!

  reply	other threads:[~2021-08-26 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 17:04 [PATCH] sched: Switch wait_task_inactive to HRTIMER_MODE_REL_HARD Sebastian Andrzej Siewior
2021-08-26 17:14 ` Peter Zijlstra [this message]
2021-09-09 11:18 ` [tip: sched/core] " tip-bot2 for Sebastian Andrzej Siewior
2021-10-05 14:12 ` tip-bot2 for Sebastian Andrzej Siewior

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=YSfL3vdbuXWvI/Ya@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.