Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2023705ybg; Thu, 30 Jul 2020 08:30:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUb2YqwH2SS8lTRfBu/LJd6ZsDDh2MlfdBeQdpFieUE29HlxUIFhjoerJLM8a2HnvEu6qb X-Received: by 2002:a17:906:858:: with SMTP id f24mr3086861ejd.543.1596123050856; Thu, 30 Jul 2020 08:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596123050; cv=none; d=google.com; s=arc-20160816; b=AoQlSRDA4fYaslE8W+VZqGvoVqaMiDHBaZne906QG9LXWOZDdT/lq289/A0idcAyJ4 YZrP9CdqQ1rMRC1lJydNM5dhO5DXw8507WDUXJ/w5mBXDWPFdASHgG2fNFy5KDRi2OQf QmAIOnFSMkHH0/2MiiebVxUY3TDCbCmw3+JpbjpkiLE53tMdBpQ2Q10x1yY3Xgnkvbgj gEx6oPH4+KEFhciqOjTTnUEU6slEVfIxUAL3IkzTISu0dhHZ24bTrJr7Mftavx+OAD/n 3TpebXngNu6XpG4CbuM8tOWHvP/rqPwG7ab2N3Te7oa1U1MpAH3SiVRm358/pYF5zdVc QnTg== 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:message-id:subject:cc :to:from:date; bh=5eT9X5L9DLdRb2Uf0L+cwXnCF1W+HgZ5+WgNT2xZCgk=; b=U9WVIgPb8d2AJPxZnC+dP8CCgQev/Ib2bcdeMNEGsSeptUn7YNINiGjw2ZtWy1DsCI rTG9YcO06HX0yJqwjSCoVgtBl4BVjSB6Gn2rD8U7WrmusPxZd856isF2o7gvXMPhP1DA 6wduo/+V2BtQ3J1Ub8tNTfxYRQnnzSqtpWBQamrxqBXI6NdiV6MqbkMBsOrBXO8zSdOG GBkJxQSFHqa2uuhNN566p81UlG7XlGA72NQJDcG2AJe15jitj4nwzLJC2fujF4ufpd4e yWvq1Py/6nA/hCy7ut1ZKURaN3sDAsrp9QeqHEsadHMVufKAVedqvG544YGt9gcJY8d+ sCDA== ARC-Authentication-Results: i=1; mx.google.com; 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 r17si3133840eji.277.2020.07.30.08.30.28; Thu, 30 Jul 2020 08:30:50 -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; 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 S1729764AbgG3P35 (ORCPT + 99 others); Thu, 30 Jul 2020 11:29:57 -0400 Received: from foss.arm.com ([217.140.110.172]:41334 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbgG3P35 (ORCPT ); Thu, 30 Jul 2020 11:29:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 633581FB; Thu, 30 Jul 2020 08:29:56 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2C7053F66E; Thu, 30 Jul 2020 08:29:55 -0700 (PDT) Date: Thu, 30 Jul 2020 16:29:52 +0100 From: Qais Yousef To: Dietmar Eggemann Cc: peterz@infradead.org, Steven Rostedt , kernel test robot , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, x86@kernel.org, Ingo Molnar , sfr@canb.auug.org.au Subject: Re: [tip:sched/fifo 44/45] ERROR: modpost: "sched_setscheduler" undefined! Message-ID: <20200730152952.cyhlug66fos5hubg@e107158-lin.cambridge.arm.com> References: <202006192249.AYnVBGCH%lkp@intel.com> <20200709124505.GT597537@hirez.programming.kicks-ass.net> <20200709115818.36a956a4@oasis.local.home> <20200720214918.GM5523@worktop.programming.kicks-ass.net> <20200720181943.7d8efc65@oasis.local.home> <20200721083643.GG119549@hirez.programming.kicks-ass.net> <20200721101357.xoa6x4xtzkqoltfk@e107158-lin> <4a0da149-5051-8204-6f34-da4d6e42a78a@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4a0da149-5051-8204-6f34-da4d6e42a78a@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/29/20 12:23, Dietmar Eggemann wrote: > On 21/07/2020 12:13, Qais Yousef wrote: > > On 07/21/20 10:36, peterz@infradead.org wrote: > >> On Mon, Jul 20, 2020 at 06:19:43PM -0400, Steven Rostedt wrote: > >>> On Mon, 20 Jul 2020 23:49:18 +0200 > >>> Peter Zijlstra wrote: > >>> > >>>> Steve, would this work for you, or would you prefer renaming the > >>>> parameters as well? > >>>> > >>> > >>> Yeah, that's fine. You don't have any sched_fifo_high() ? > >> > >> Thanks! and no. > >> > >> I'll go write a Changelog and add it to tip/sched/fifo, so that > >> hopefully, sfr can stop complaining about this build fail ;-) > >> > >> I've even argued we should rename fifo_low() to something else, but > >> failed to come up with a sensible name. The intended case is for when > >> you want something above normal but don't particularly care about RT at > >> all. > >> > >> The thing is, once you start adding priorities, even low,med,high, we're > >> back to where we were. And the whole argument is that the kernel cannot > >> set priorities in any sensible fashion. > > > > Agreed. I am worried about in-kernel users setting random uclamp values too. > > Do we really have to restrict in-kernel user? > > And avoiding module uclamp abuse is covered by 616d91b68cd5 ("sched: > Remove sched_setscheduler*() EXPORTs"). > > > This series should do most of the work but there are more pieces needed on-top. > > > > From what I see we still need to move the sched_setscheduler() from > > include/linux/sched.h to kernel/sched/sched.h. And sched_setattr() too. The > > latter has a single user in kernel/trace/trace_selftest.c to create a deadline > > task. I think that can be easily wrapped with a similar sched_set_dl() > > function and exported instead. > > But DL does not have the same issue like the FIFO/RR when it comes to > resource management. > Not sure if we have to restrict in-kernel user. FWIW, I have the patches ready and tested for posting. http://linux-arm.org/git?p=linux-qy.git;a=shortlog;h=refs/heads/sched-setscheduler-hide Peter, do you think it's not necessary to go to that level of restriction too? It'll just avoid surprises IMO by making sched_set{sched, attr}() static. The wrapper can be flexible to change if needed, but at least we'll know. I addressed Paul's concern on IRC too. Thanks -- Qais Yousef