public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: yjin <yanjiang.jin@windriver.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: <mingo@redhat.com>, <bigeasy@linutronix.de>,
	<peterz@infradead.org>, <linux-kernel@vger.kernel.org>,
	<jinyanjiang@gmail.com>, <stable-rt@vger.kernel.org>,
	<linux-rt-users@vger.kernel.org>
Subject: Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func
Date: Sat, 14 Nov 2015 12:40:42 +0800	[thread overview]
Message-ID: <5646BB4A.50307@windriver.com> (raw)
In-Reply-To: <20151113232512.53df431f@gandalf.local.home>


On 2015年11月14日 12:25, Steven Rostedt wrote:
> On Sat, 14 Nov 2015 10:53:18 +0800
> <yanjiang.jin@windriver.com> wrote:
>
>> From: Yanjiang Jin <yanjiang.jin@windriver.com>
>>
>> This can only happen in RT kernel due to run_timer_softirq() calls
>> irq_work_tick() when CONFIG_PREEMPT_RT_FULL is enabled as below:
>>
>> static void run_timer_softirq(struct softirq_action *h)
>> {
>> ........
>> if defined(CONFIG_IRQ_WORK) && defined(CONFIG_PREEMPT_RT_FULL)
>>          irq_work_tick();
>> endif
>> ........
>> }
>>
>> Use raw_spin_{un,}lock_irq{save,restore} in push_irq_work_func() to
>> prevent following potentially deadlock scenario:
> Ug. No, the real fix is that the irq work is to be run from hard
> interrupt context.
But if so, we shouldn't call irq_work_tick() in run_timer_softirq(), right?

Thanks!
Yanjiang
> Moving the scheduling of high priority real-time
> tasks to ksoftirqd defeats the purpose. The question is, why is that
> irq work being run from thread context when it has the
> IRQ_WORK_HARD_IRQ flag set?
>
> -- Steve
>


  reply	other threads:[~2015-11-14  5:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-14  2:53 [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func yanjiang.jin
2015-11-14  4:25 ` Steven Rostedt
2015-11-14  4:40   ` yjin [this message]
2015-11-15  8:15     ` Thomas Gleixner
2015-11-15  8:26       ` Thomas Gleixner
2015-11-15 11:05         ` Thomas Gleixner
2015-11-16  5:26           ` yjin
2015-11-18 15:56             ` 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=5646BB4A.50307@windriver.com \
    --to=yanjiang.jin@windriver.com \
    --cc=bigeasy@linutronix.de \
    --cc=jinyanjiang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=stable-rt@vger.kernel.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