Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp767590ybz; Wed, 22 Apr 2020 07:39:39 -0700 (PDT) X-Google-Smtp-Source: APiQypKsc7+A+d2ybXPEQIM6jy/zFSrRGM/3oNW//eDHc6iXg6je79zbwZjCkdStbk4wlrxWWpcU X-Received: by 2002:aa7:db0b:: with SMTP id t11mr12161754eds.304.1587566379324; Wed, 22 Apr 2020 07:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587566379; cv=none; d=google.com; s=arc-20160816; b=E3keRKf0pq2JIOH9gbnhUb9CjEc2drtzwCFdwinps/09mgMvqAHDIw+JRy/AD0Gnbk 5E7U4jK/7718DL46wqFncL33iYftvQAUCFkmm6wMFGJdf6z5H9RdFp2yBqKxU+u5gmhl NC0cMewR1HFZ1ZKGmqLqMJxTHeR5vYtjMyR2AwGx3nTybMZy7sTPq88mA++ewQ57a5gI F3FNsCdtMbu+SKk5TxwFyjFk1kFlindmtpassnCrDXW1h5ysGLf626siPemaAUSySexU Ld5egvQcT1mRbIU1Z7aYRl+0aHlUVt+y8CEJCbApImtdzJ+EF9NNDFnXjmKIlsOUeijq cIEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gjLk9T8BGNqyiWa+uxHPrqixf8yW/93L5sAqBSW+8eY=; b=zmdF2YxUl8CGN4M4CC3DAAk5qK/RAvp6HRXbVhOZcURjYprJG5D+j6ROknnn0Ztn6i rKq2SRcdn/qh6W5QFpUscdOpH0dn+mFjO5BVsyKH0paLBR1WlFPXm4XG/+CznikzEQC+ smAmlqhj/XeDjpbD0cJtmzMEMnE4VvaLhMHpQi9GkGf+ADnoCVKvM64Y4PJ8Y00+z8lr l/SVPwrAnBzwgI19bp0ADYBX/NoCOyEhXdtSMFM7f/VypwFBUSfYHTl7FmNoyNfdf5Tf dJPqv7MD8CSn4jD3pvpJ8QJ0jPrfv9hsRpNFasQUVfjMCHm5BY/D/zqVe0y2+RQ/V7yL 1Wzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DTSszN7Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl27si3646473ejb.17.2020.04.22.07.39.10; Wed, 22 Apr 2020 07:39:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DTSszN7Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726144AbgDVN1a (ORCPT + 99 others); Wed, 22 Apr 2020 09:27:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725924AbgDVN1a (ORCPT ); Wed, 22 Apr 2020 09:27:30 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 266B1C03C1A9 for ; Wed, 22 Apr 2020 06:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=gjLk9T8BGNqyiWa+uxHPrqixf8yW/93L5sAqBSW+8eY=; b=DTSszN7YNy78HwkU174Co33LCh USOWZZbZNI6GPYfBtVV0Wahyg+sXLcLRLlejgT6Dmt6kHWe8PZk1V0DluYIG9/XKdqLF7IWcZsE6y 6tLsVwqckW4A360d+H6pt6LRbT2Gcb/HWE5eAOpV3SPKZBhpBgZNbefsvLuQNcOcvTvOMowDcH6d9 obZJ0BsIVifM+2rD+dFxSyYJdoGiEhTu+WAu9YEsTlMBC8UcsbG5x5yTuWdVeQ6IrBWwO0Y0h0HiI s29M4uRRg5bO7VXDrFuJhrX4ZGPBpLwjfwOnaVujl0h2ZHjuPtiOWZa58SXEs1T4O+4dlpinSLly2 Phx6ehLQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRFOt-0007PS-NU; Wed, 22 Apr 2020 13:26:51 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1E2B2306064; Wed, 22 Apr 2020 15:26:48 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B7FF725E17E39; Wed, 22 Apr 2020 15:26:48 +0200 (CEST) Date: Wed, 22 Apr 2020 15:26:48 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rostedt@goodmis.org, qais.yousef@arm.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, airlied@redhat.com, alexander.deucher@amd.com, awalls@md.metrocast.net, axboe@kernel.dk, broonie@kernel.org, daniel.lezcano@linaro.org, gregkh@linuxfoundation.org, hannes@cmpxchg.org, herbert@gondor.apana.org.au, hverkuil@xs4all.nl, john.stultz@linaro.org, nico@fluxnic.net, rafael.j.wysocki@intel.com, rmk+kernel@arm.linux.org.uk, sudeep.holla@arm.com, ulf.hansson@linaro.org, wim@linux-watchdog.org Subject: Re: [PATCH 01/23] sched: Provide sched_set_fifo() Message-ID: <20200422132648.GJ20730@hirez.programming.kicks-ass.net> References: <20200422112719.826676174@infradead.org> <20200422112831.266499893@infradead.org> <20200422131138.GL17661@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422131138.GL17661@paulmck-ThinkPad-P72> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 06:11:38AM -0700, Paul E. McKenney wrote: > On Wed, Apr 22, 2020 at 01:27:20PM +0200, Peter Zijlstra wrote: > > SCHED_FIFO (or any static priority scheduler) is a broken scheduler > > model; it is fundamentally incapable of resource management, the one > > thing an OS is actually supposed to do. > > > > It is impossible to compose static priority workloads. One cannot take > > two well designed and functional static priority workloads and mash > > them together and still expect them to work. > > > > Therefore it doesn't make sense to expose the priority field; the > > kernel is fundamentally incapable of setting a sensible value, it > > needs systems knowledge that it doesn't have. > > > > Take away sched_setschedule() / sched_setattr() from modules and > > replace them with: > > > > - sched_set_fifo(p); create a FIFO task (at prio 50) > > - sched_set_fifo_low(p); create a task higher than NORMAL, > > which ends up being a FIFO task at prio 1. > > - sched_set_normal(p, nice); (re)set the task to normal > > > > This stops the proliferation of randomly chosen, and irrelevant, FIFO > > priorities that dont't really mean anything anyway. > > > > The system administrator/integrator, whoever has insight into the > > actual system design and requirements (userspace) can set-up > > appropriate priorities if and when needed. > > The sched_setscheduler_nocheck() calls in rcu_spawn_gp_kthread(), > rcu_cpu_kthread_setup(), and rcu_spawn_one_boost_kthread() all stay as > is because they all use the rcutree.kthread_prio boot parameter, which is > set at boot time by the system administrator (or {who,what}ever, correct? Correct, also they are not modular afaict, so they escaped the dance ;-)