[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e5c9f93d-5e60-7410-fa74-e07278bb1b85@redhat.com>
Date: Mon, 29 Mar 2021 10:23:18 -0400
From: Waiman Long <longman@...hat.com>
To: Daniel Thompson <daniel.thompson@...aro.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Bharata B Rao <bharata@...ux.vnet.ibm.com>,
Phil Auld <pauld@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] sched/debug: Don't disable IRQ when acquiring
sched_debug_lock
On 3/29/21 6:23 AM, Daniel Thompson wrote:
> On Sat, Mar 27, 2021 at 07:25:28PM -0400, Waiman Long wrote:
>> The sched_debug_lock was used only in print_cpu(). The
>> print_cpu() function has two callers - sched_debug_show() and
>> sysrq_sched_debug_show(). Both of them are invoked by user action
>> (sched_debug file and sysrq-t). As print_cpu() won't be called from
>> interrupt context at all, there is no point in disabling IRQ when
>> acquiring sched_debug_lock.
> This looks like it introduces a deadlock risk if sysrq-t triggers from an
> interrupt context. Has the behaviour of sysrq changed recently or will
> tools like MAGIC_SYSRQ_SERIAL still trigger from interrupt context?
You are right. It looks like that if CONFIG_MAGIC_SYSRQ_SERIAL is set,
it is possible for sysrq information dump to happen in an interrupt
context. I missed that in my initial analysis. However, doing the time
consuming info dump with interrupt disabled for an extended period of
time is not a good idea.
Still with my second patch to minimize the size of the critical
sections, it will minimize the chance of causing trouble except when
doing it directly from the console.
Thanks,
Longman
Powered by blists - more mailing lists