From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbcDRJEA (ORCPT ); Mon, 18 Apr 2016 05:04:00 -0400 Received: from www.linutronix.de ([62.245.132.108]:33592 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbcDRJD7 (ORCPT ); Mon, 18 Apr 2016 05:03:59 -0400 Date: Mon, 18 Apr 2016 11:02:28 +0200 (CEST) From: Thomas Gleixner To: xlpang@redhat.com cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Juri Lelli , Ingo Molnar , Steven Rostedt Subject: Re: [PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter In-Reply-To: <57149E8A.6060701@redhat.com> Message-ID: References: <1460633827-345-1-git-send-email-xlpang@redhat.com> <1460633827-345-2-git-send-email-xlpang@redhat.com> <57149E8A.6060701@redhat.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, tglx