Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751745AbbKNFNn (ORCPT ); Sat, 14 Nov 2015 00:13:43 -0500 Received: from mail5.windriver.com ([192.103.53.11]:34826 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbbKNFNm (ORCPT ); Sat, 14 Nov 2015 00:13:42 -0500 X-Greylist: delayed 1826 seconds by postgrey-1.27 at vger.kernel.org; Sat, 14 Nov 2015 00:13:41 EST Message-ID: <5646BB4A.50307@windriver.com> Date: Sat, 14 Nov 2015 12:40:42 +0800 From: yjin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Steven Rostedt CC: , , , , , , Subject: Re: [RT PATCH] sched: rt: fix two possible deadlocks in push_irq_work_func References: <1447469598-31876-1-git-send-email-yanjiang.jin@windriver.com> <20151113232512.53df431f@gandalf.local.home> In-Reply-To: <20151113232512.53df431f@gandalf.local.home> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1298 Lines: 40 On 2015年11月14日 12:25, Steven Rostedt wrote: > On Sat, 14 Nov 2015 10:53:18 +0800 > wrote: > >> From: Yanjiang Jin >> >> 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/