From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965629AbbD1Msb (ORCPT ); Tue, 28 Apr 2015 08:48:31 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:38130 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965417AbbD1Ms2 (ORCPT ); Tue, 28 Apr 2015 08:48:28 -0400 Message-ID: <1430225304.3378.44.camel@gmail.com> Subject: Re: [PATCH v6 2/3] sched/rt: Fix wrong SMP scheduler behavior for equal prio cases From: Mike Galbraith To: Peter Zijlstra Cc: Steven Rostedt , pang.xunlei@zte.com.cn, Juri Lelli , linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org, Xunlei Pang Date: Tue, 28 Apr 2015 14:48:24 +0200 In-Reply-To: <20150428101910.GU23123@twins.programming.kicks-ass.net> References: <20150420172048.GZ27490@worktop.programming.kicks-ass.net> <20150420134803.5446e32d@gandalf.local.home> <20150422230122.3637f11f@grimm.local.home> <20150424183255.GO23123@twins.programming.kicks-ass.net> <20150425182306.GS23123@twins.programming.kicks-ass.net> <20150426115851.48042c84@grimm.local.home> <20150428101910.GU23123@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-04-28 at 12:19 +0200, Peter Zijlstra wrote: > On Sun, Apr 26, 2015 at 11:58:51AM -0400, Steven Rostedt wrote: > > I think what Xunlei is trying to say, is that we don't currently keep > > FIFO when preemption or migration is involved. If a task is currently > > running, strict FIFO denotes that it should run ahead of all other > > tasks queued at its priority or less until it decides to schedule out. > > But the issue is, if it gets preempted or migrates, it gets placed > > behind other tasks of the same priority as itself, but it never > > voluntarily relinquished the CPU. > > So 1) FIFO is only defined for UP, anything SMP is well outside of the > FIFO spec and therefore we cannot break it. > > 2) The 'head' of the queue only has meaning on UP, with SMP there's 'n' > heads, which of those heads is is the foremost head? That is, we're > already lost order, you cannot reconstruct. This cannot be done without > first defining order and then implementing that. Good luck with that :) Trying to preserve run order across the box led me to a seemingly _endless_ supply of deadlocks while piddling with preemptible spinning locks in rt. Maybe you can pull that off, me it gave serious headaches. -Mike