All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: kbuild-all@lists.01.org
Subject: Re: [tip:sched/fifo 44/45] ERROR: modpost: "sched_setscheduler" undefined!
Date: Mon, 20 Jul 2020 23:49:18 +0200	[thread overview]
Message-ID: <20200720214918.GM5523@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20200709115818.36a956a4@oasis.local.home>

[-- Attachment #1: Type: text/plain, Size: 2751 bytes --]

On Thu, Jul 09, 2020 at 11:58:18AM -0400, Steven Rostedt wrote:
> On Thu, 9 Jul 2020 14:45:05 +0200
> Peter Zijlstra <peterz@infradead.org> 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 <lkp@intel.com>
> > > 
> > > 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, &param);
-		} 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, &param);
-	} 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;

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, Ingo Molnar <mingo@kernel.org>,
	sfr@canb.auug.org.au
Subject: Re: [tip:sched/fifo 44/45] ERROR: modpost: "sched_setscheduler" undefined!
Date: Mon, 20 Jul 2020 23:49:18 +0200	[thread overview]
Message-ID: <20200720214918.GM5523@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20200709115818.36a956a4@oasis.local.home>

On Thu, Jul 09, 2020 at 11:58:18AM -0400, Steven Rostedt wrote:
> On Thu, 9 Jul 2020 14:45:05 +0200
> Peter Zijlstra <peterz@infradead.org> 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 <lkp@intel.com>
> > > 
> > > 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, &param);
-		} 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, &param);
-	} 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;


  reply	other threads:[~2020-07-20 21:49 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 14:15 [tip:sched/fifo 44/45] ERROR: modpost: "sched_setscheduler" undefined! kernel test robot
2020-06-19 14:15 ` kernel test robot
2020-07-09 12:45 ` Peter Zijlstra
2020-07-09 12:45   ` Peter Zijlstra
2020-07-09 15:58   ` Steven Rostedt
2020-07-09 15:58     ` Steven Rostedt
2020-07-20 21:49     ` Peter Zijlstra [this message]
2020-07-20 21:49       ` Peter Zijlstra
2020-07-20 22:19       ` Steven Rostedt
2020-07-20 22:19         ` Steven Rostedt
2020-07-21  8:36         ` peterz
2020-07-21  8:36           ` peterz
2020-07-21 10:13           ` Qais Yousef
2020-07-21 10:13             ` Qais Yousef
2020-07-29 10:23             ` Dietmar Eggemann
2020-07-29 10:23               ` Dietmar Eggemann
2020-07-29 10:38               ` Qais Yousef
2020-07-29 10:38                 ` Qais Yousef
2020-07-30 15:29               ` Qais Yousef
2020-07-30 15:29                 ` Qais Yousef
2020-07-21 13:30           ` Steven Rostedt
2020-07-21 13:30             ` Steven Rostedt
2020-07-24 21:39       ` [PATCH] sched,tracing: Convert to sched_set_fifo() peterz
2020-07-24 21:39         ` peterz
2020-07-24 21:46         ` Steven Rostedt
2020-07-24 21:46           ` Steven Rostedt
2020-07-24 21:50           ` [PATCH v2] " peterz
2020-07-24 21:50             ` peterz
2020-07-24 22:18             ` [PATCH v2] sched, tracing: " Steven Rostedt
2020-07-24 22:18               ` [PATCH v2] sched,tracing: " Steven Rostedt
2020-07-25 16:58               ` [PATCH v2] sched, tracing: " Peter Zijlstra
2020-07-25 16:58                 ` [PATCH v2] sched,tracing: " Peter Zijlstra
2020-07-27 20:56                 ` [PATCH v2] sched, tracing: " Steven Rostedt
2020-07-27 20:56                   ` [PATCH v2] sched,tracing: " Steven Rostedt
2020-07-29 10:54       ` [tip: sched/fifo] " tip-bot2 for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200720214918.GM5523@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.