Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp215698ybh; Mon, 20 Jul 2020 14:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+jFrmlOTMwXsHLGYW0W/IEH4dC7EDOZj7MXd44obldy4Pv8P3dJyjM3oX5rw3k4mC/Lr/ X-Received: by 2002:a17:906:cecf:: with SMTP id si15mr22142154ejb.508.1595281816399; Mon, 20 Jul 2020 14:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595281816; cv=none; d=google.com; s=arc-20160816; b=iDrb8xchs0ZbX7ZkAlsm8y1GBkiH+RVAA2mT/Np9x9Gn6kswRvwfDoDJCgzO3xbmkV andB5/ueUtkfrJAnnfO8ef+xidOWfd296cjY9hrEd6AaQ0BUkxzYsFMxOgZHBpab3Pfb JjKuPvm6P6kofv79TlhDBaXn34RXUaJJuV/W0R5P10I9z7b7K3pWz3FhVNjtM93cx6uk 0JHLS7LMp5quVUHADqaHpWf3ASq+4DeckBgBDIifrZvyoA1/yonq9RfJiTQTjH5zR62+ aBQTDQONbFBfGyuAVs5mMIwCNEVL0agDRCHEH7nIPB9Vt0zQxZn6BNqnrK9S9MV1Z54a R02A== 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:dkim-signature; bh=Q/pmUl9G9tnIINckX+tsc4ZNDGVpCit7S6QnO2IEd7w=; b=QIapLeUr22Rt8mqKCvS3NDCLGvEna3/W3RxgBEiy7B48LMpgdMuQRnW+ah4zmA1Jod sIQVndH00l4jBvTUPtffbQ0OkVPNVDQ+wFossSm2vwwVrEqC2pwjyp+tjp581orhSl/q D8ZgoSfYO3gNyAroK6BFsK2yENNymFfYV1ioQasYuimHk3Ecp4M5L2L9kkjdW2dlk8aS ITU0kvyfLVDXjza8hrL/iot1SqPeGcv7Q4Z0q+bnfq19gagB5uAXHs6UTr7Fuc0o/LpZ z9G18vxux4Q53s2Qi1lgR23yYL47ze05lG14lCsQZXVfZgKcd62ViCVZGZhg3PKEeesu /QMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="Gadm/98g"; 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 s23si13328204edi.7.2020.07.20.14.49.52; Mon, 20 Jul 2020 14:50:16 -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=merlin.20170209 header.b="Gadm/98g"; 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 S1726691AbgGTVtp (ORCPT + 99 others); Mon, 20 Jul 2020 17:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbgGTVtp (ORCPT ); Mon, 20 Jul 2020 17:49:45 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5342C061794 for ; Mon, 20 Jul 2020 14:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=Q/pmUl9G9tnIINckX+tsc4ZNDGVpCit7S6QnO2IEd7w=; b=Gadm/98gBnXxEvK0+FpIzGCCvW FDiBWH+ibqVz6jGQaLhPole6CbO2mFOmoIxn+F5jveIZNcb7MSBi8u/b49zwggvxfKroIVAbGjjPa n5ZHitwtSJFL26qAyZ09T+mjzYf885xBwFFswSVyPR9tnOF++n8z32YVwbp6sPLd+ol/m7T0GLZYt SLamz/Fesla3Ozg8zFXPyCkpggBKftZmOVvbroAMoJzO8NqOUc4tRUPkKqxwsuoN199gBpkELsa4W 3vogAveu0epEF2qsUHs/ZBPNPJ+0O+e0AZfIHihRMFj4m8w7pc3aT98VQuFGpKpKNKMOVYacHXdCU pCnAEfhg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxdez-0007Qr-I1; Mon, 20 Jul 2020 21:49:21 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 5A83A983454; Mon, 20 Jul 2020 23:49:18 +0200 (CEST) Date: Mon, 20 Jul 2020 23:49:18 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: 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: <20200720214918.GM5523@worktop.programming.kicks-ass.net> References: <202006192249.AYnVBGCH%lkp@intel.com> <20200709124505.GT597537@hirez.programming.kicks-ass.net> <20200709115818.36a956a4@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200709115818.36a956a4@oasis.local.home> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 09, 2020 at 11:58:18AM -0400, Steven Rostedt wrote: > On Thu, 9 Jul 2020 14:45:05 +0200 > Peter Zijlstra wrote: > > > On Fri, Jun 19, 2020 at 10:15:51PM +0800, kernel test robot wrote: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/fifo > > > head: 8b700983de82f79e05b2c1136d6513ea4c9b22c4 > > > commit: 616d91b68cd56bcb1954b6a5af7d542401fde772 [44/45] sched: Remove sched_setscheduler*() EXPORTs > > > config: x86_64-rhel (attached as .config) > > > compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 > > > reproduce (this is a W=1 build): > > > git checkout 616d91b68cd56bcb1954b6a5af7d542401fde772 > > > # save the attached .config to linux build tree > > > make W=1 ARCH=x86_64 > > > > > > If you fix the issue, kindly add following tag as appropriate > > > Reported-by: kernel test robot > > > > > > All errors (new ones prefixed by >>, old ones prefixed by <<): > > > > > > >> ERROR: modpost: "sched_setscheduler" [kernel/trace/ring_buffer_benchmark.ko] undefined! > > > > Steve, do you have any preference on how to go about fixing this one? > > Well, I use to manually set the priority of the test, but I guess we > can switch the parameters to accepting a "high, medium, and low" that > will correspond to your setting of the other sched_setscheduler() calls > that were replaced. Steve, would this work for you, or would you prefer renaming the parameters as well? --- kernel/trace/ring_buffer_benchmark.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c index 8df0aa810950..0ee3d41ceee4 100644 --- a/kernel/trace/ring_buffer_benchmark.c +++ b/kernel/trace/ring_buffer_benchmark.c @@ -455,21 +455,19 @@ static int __init ring_buffer_benchmark_init(void) * Run them as low-prio background tasks by default: */ if (!disable_reader) { - if (consumer_fifo >= 0) { - struct sched_param param = { - .sched_priority = consumer_fifo - }; - sched_setscheduler(consumer, SCHED_FIFO, ¶m); - } else + if (consumer_fifo > 1) + sched_set_fifo(consumer); + else if (consumer_fifo >= 0) + sched_set_fifo_low(consumer); + else set_user_nice(consumer, consumer_nice); } - if (producer_fifo >= 0) { - struct sched_param param = { - .sched_priority = producer_fifo - }; - sched_setscheduler(producer, SCHED_FIFO, ¶m); - } else + if (producer_fifo > 1) + sched_set_fifo(producer); + else if (producer_fifo >= 0) + sched_set_fifo_low(producer); + else set_user_nice(producer, producer_nice); return 0;