Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269421

Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func

From yjin <yanjiang.jin@windriver.com>
Newsgroups linux.kernel
Subject Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func
Date 2015-11-14 06:20 +0100
Message-ID <quBpL-89B-1@gated-at.bofh.it> (permalink)
References <quzei-6sF-3@gated-at.bofh.it> <quADo-7Dz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func <yanjiang.jin@windriver.com> - 2015-11-14 04:00 +0100
  Re: [RT PATCH] sched: rt: fix two possible deadlocks in  push_irq_work_func Steven Rostedt <rostedt@goodmis.org> - 2015-11-14 05:30 +0100
    Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func yjin <yanjiang.jin@windriver.com> - 2015-11-14 06:20 +0100
      Re: [RT PATCH] sched: rt: fix two possible deadlocks in  push_irq_work_func Thomas Gleixner <tglx@linutronix.de> - 2015-11-15 09:20 +0100
        Re: [RT PATCH] sched: rt: fix two possible deadlocks in  push_irq_work_func Thomas Gleixner <tglx@linutronix.de> - 2015-11-15 09:30 +0100
          Re: [RT PATCH] sched: rt: fix two possible deadlocks in  push_irq_work_func Thomas Gleixner <tglx@linutronix.de> - 2015-11-15 12:10 +0100
            Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func yjin <yanjiang.jin@windriver.com> - 2015-11-16 06:30 +0100

csiph-web