[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56FE78E0.5060504@redhat.com>
Date: Fri, 1 Apr 2016 21:34:24 +0800
From: Xunlei Pang <xpang@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>, xlpang@...hat.com
Cc: linux-kernel@...r.kernel.org, Juri Lelli <juri.lelli@....com>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks
On 2016/04/01 at 21:12, Peter Zijlstra wrote:
>
> On 1 April 2016 14:23:58 CEST, Xunlei Pang <xpang@...hat.com> wrote:
>
>>>> We need this iff lock owner has the deadline priority.
>>> How is this deadline specific, those functions you modify are
>>> deadline/rt agnostic.
>> I checked the code, currently only deadline accesses the
>> pi_waiters/pi_waiters_leftmost
>> without pi_lock held via rt_mutex_get_top_task(), other cases all have
>> pi_lock held.
>>
>> So adding the condition.
> How does that not suggest fixing the deadline code?
I did tried that at first, but found it very hard when processing
pull_dl_task(push_dl_task can crash as well) like:
double_lock_balance(this_rq, src_rq);
p = pick_earliest_pushable_dl_task(src_rq, this_cpu);
/* and for each @p, we must hold its pi_lock,
doing this once rq is locked will cause deadlock. */
Ditto for enqueue_task_dl()->rt_mutex_get_top_task(), as rq is locked.
If we unlock rq first and then lock pi_lock, this may cause other problems
due to unlocking rq.
Any better ideas is welcome.
Regards,
Xunlei
Powered by blists - more mailing lists