Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751984AbcDRJlu (ORCPT ); Mon, 18 Apr 2016 05:41:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50075 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863AbcDRJlt (ORCPT ); Mon, 18 Apr 2016 05:41:49 -0400 Reply-To: xlpang@redhat.com Subject: Re: [PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter References: <1460633827-345-1-git-send-email-xlpang@redhat.com> <1460633827-345-2-git-send-email-xlpang@redhat.com> <57149E8A.6060701@redhat.com> To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Juri Lelli , Ingo Molnar , Steven Rostedt From: Xunlei Pang Message-ID: <5714ABD9.80002@redhat.com> Date: Mon, 18 Apr 2016 17:41:45 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 853 Lines: 35 On 2016/04/18 at 17:02, Thomas Gleixner wrote: > On Mon, 18 Apr 2016, Xunlei Pang wrote: >> On 2016/04/18 at 16:23, Thomas Gleixner wrote: >>> On Thu, 14 Apr 2016, Xunlei Pang wrote: >>>> We should deboost before waking the high-prio task such that >>>> we don't run two tasks with the 'same' priority. >>> No. This is fundamentaly broken. >>> >>> T1 (prio 0) lock(X) >>> >>> --> preemption >>> >>> T2 (prio 10) lock(X) >>> boost(T1) >>> schedule() >>> >>> T1 (prio 10) unlock(X) >> We add a preempt_disable() before deboost to avoid the breakage, >> there's also some comment about this in the patch's code. > So the changelog is useless and misleading. Neither does it explain what's > wrong with having two tasks with the same priority in running state. Sorry about that, will improve it. Regards, Xunlei > > Thanks, > > tglx > > > >