Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp837442ybz; Wed, 22 Apr 2020 08:51:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIY9JldiF3X7Xl8yCAMjqzeMcZifa6ijzyNd26JBPUIyPRMeqXvxGxV0al/YsTtc/Cj8/Bv X-Received: by 2002:a50:9eaf:: with SMTP id a44mr24637091edf.58.1587570706605; Wed, 22 Apr 2020 08:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587570706; cv=none; d=google.com; s=arc-20160816; b=qpJz+n2SdNQxo0RTjfP5ipUXM8mgqSL36UoivXAkUiRKIdZaou/CMTCBTotThCN5jJ HCIa3KWZHr9iTTVlbyhZCrIAUmOFWS5shJX/Q0GShL5xdmeoFqKdY0jhBPKLcQi+e7o5 xf7wwTKWbpZazvAfQfnKJQO5fQEPJ7ElrvIAo03G2lwo8ILexbkB3GEjVTU8Y/P1a/Tn lqPuLYwmbyPSVgKigd0BM3tKV7K+nSXq4HlcfTaG70DK1aCjd50iraOB+SOTKCaO0F8E +Osoxv7t3ijHunS1fCYFjFHV4L0Lmnv+d1V+jn5y70grl3CUqLrhQULRcdNduGTWT7IU Z8Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Mg2Z+jBO5vDV9fkrTwlBUrWyuQlTFOOeqfQeVOtXki8=; b=oCCSFYcp8vR+geJPrMrm6lnh3HwG2W3Y1YXILGEwgOOho2mWUVuihMqH87ajGB4yt1 hU9PBHmBS3xXcwOosgleQgcfqSMJQ4l7pzYEu/YH9AjdOX3CwBrXeWYBvIPAhm7sGvbA jYBJes7S/zmCVi7klD3mxeSNBB2TKnNho7WuFb7qVTNmyglC69o5DuJHMJfSYBsbmqiG HjVHFK70VlQ4Q/UgnF3jNRY9xtKNK3o4OzPDuPuJMeqCVsdENbjJszszqVTIXow2qgCI Y9KfqpLmbM74W2ybKf3rvhGE+KdnjUBmI0joaD1wnlFRno17OAdiqxMeZV/7TqaSqSGi AnvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N319B63a; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t27si3642540edt.100.2020.04.22.08.51.23; Wed, 22 Apr 2020 08:51:46 -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=pass header.i=@kernel.org header.s=default header.b=N319B63a; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbgDVPuJ (ORCPT + 99 others); Wed, 22 Apr 2020 11:50:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:55092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbgDVPuI (ORCPT ); Wed, 22 Apr 2020 11:50:08 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F1CB20767; Wed, 22 Apr 2020 15:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587570608; bh=ez7+ZsWjDbKtPTHLw+h/ZrnG00It65erPt+3scOnxEI=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=N319B63a8bPYR1tPct/qnNKws4vGPRf7xGiJPSfc5mpsTEdUfvKZZ0svx6z4r/7ha UncFjsX/iCEj+1bpXMVvqQirWXHX1XPIIqD95XzMVmsOj9yqrQ/zgBJWucHXnVU2An TdnzeGHQtp+e9NqC810NhqaKAUBIIoOxNr8JSBCw= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 9A3FC35203BC; Wed, 22 Apr 2020 08:50:06 -0700 (PDT) Date: Wed, 22 Apr 2020 08:50:06 -0700 From: "Paul E. McKenney" To: Peter Zijlstra 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: <20200422155006.GR17661@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200422112719.826676174@infradead.org> <20200422112831.266499893@infradead.org> <20200422131138.GL17661@paulmck-ThinkPad-P72> <20200422132648.GJ20730@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200422132648.GJ20730@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.4 (2018-02-28) 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 03:26:48PM +0200, Peter Zijlstra wrote: > 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 ;-) Indeed, an extreme form of insanity would be required to try to make core RCU be a module. Not that such a form of insanity is a bad thing in and of itself, but it might best be directed towards less futile ventures. ;-) Thanx, Paul