mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Bristot de Oliveira <bristot@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org,
	Luca Abeni <luca.abeni@santannapisa.it>,
	Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>,
	Thomas Gleixner <tglx@linutronix.de>,
	Joel Fernandes <joel@joelfernandes.org>,
	Vineeth Pillai <vineeth@bitbyteword.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	bristot@kernel.org, Phil Auld <pauld@redhat.com>
Subject: Re: [PATCH v4 7/7] sched/fair: Fair server interface
Date: Fri, 1 Sep 2023 10:01:01 +0800	[thread overview]
Message-ID: <202309010917.ryl6BbIf-lkp@intel.com> (raw)
In-Reply-To: <db775d65b18ddac4a75faad6761c6c2abf3efb78.1693510979.git.bristot@kernel.org>

Hi Daniel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on tip/master linus/master next-20230831]
[cannot apply to tip/auto-latest v6.5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Daniel-Bristot-de-Oliveira/sched-Unify-runtime-accounting-across-classes/20230901-043307
base:   tip/sched/core
patch link:    https://lore.kernel.org/r/db775d65b18ddac4a75faad6761c6c2abf3efb78.1693510979.git.bristot%40kernel.org
patch subject: [PATCH v4 7/7] sched/fair: Fair server interface
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230901/202309010917.ryl6BbIf-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230901/202309010917.ryl6BbIf-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309010917.ryl6BbIf-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/build_utility.c:73:
>> kernel/sched/debug.c:386:56: warning: integer overflow in expression of type 'long int' results in '-100663296' [-Woverflow]
     386 | static unsigned int fair_server_period_max = (1 << 22) * NSEC_PER_USEC; /* ~4 seconds */
         |                                                        ^
>> kernel/sched/debug.c:491:6: warning: no previous prototype for 'debugfs_fair_server_init' [-Wmissing-prototypes]
     491 | void debugfs_fair_server_init(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~


vim +386 kernel/sched/debug.c

   385	
 > 386	static unsigned int fair_server_period_max = (1 << 22) * NSEC_PER_USEC; /* ~4 seconds */
   387	static unsigned int fair_server_period_min = (100) * NSEC_PER_USEC;     /* 100 us */
   388	
   389	static ssize_t
   390	sched_fair_server_period_write(struct file *filp, const char __user *ubuf,
   391				       size_t cnt, loff_t *ppos)
   392	{
   393		long cpu = (long) ((struct seq_file *) filp->private_data)->private;
   394		struct rq *rq = cpu_rq(cpu);
   395		unsigned long flags;
   396		u64 period;
   397		int err;
   398	
   399		err = kstrtoull_from_user(ubuf, cnt, 10, &period);
   400		if (err)
   401			return err;
   402	
   403		if (period < fair_server_period_min || period > fair_server_period_max)
   404			return -EINVAL;
   405	
   406		raw_spin_rq_lock_irqsave(rq, flags);
   407		if (period < rq->fair_server.dl_runtime)
   408			err = -EINVAL;
   409		else
   410			rq->fair_server.dl_period = period;
   411		raw_spin_rq_unlock_irqrestore(rq, flags);
   412	
   413		if (err)
   414			return err;
   415	
   416		*ppos += cnt;
   417		return cnt;
   418	}
   419	
   420	static int sched_fair_server_period_show(struct seq_file *m, void *v)
   421	{
   422		unsigned long cpu = (unsigned long) m->private;
   423		struct rq *rq = cpu_rq(cpu);
   424	
   425		seq_printf(m, "%llu\n", rq->fair_server.dl_period);
   426		return 0;
   427	}
   428	
   429	static int sched_fair_server_period_open(struct inode *inode, struct file *filp)
   430	{
   431		return single_open(filp, sched_fair_server_period_show, inode->i_private);
   432	}
   433	
   434	static const struct file_operations fair_server_period_fops = {
   435		.open		= sched_fair_server_period_open,
   436		.write		= sched_fair_server_period_write,
   437		.read		= seq_read,
   438		.llseek		= seq_lseek,
   439		.release	= single_release,
   440	};
   441	
   442	static ssize_t
   443	sched_fair_server_defer_write(struct file *filp, const char __user *ubuf,
   444				      size_t cnt, loff_t *ppos)
   445	{
   446		long cpu = (long) ((struct seq_file *) filp->private_data)->private;
   447		struct rq *rq = cpu_rq(cpu);
   448		unsigned long flags;
   449		u64 defer;
   450		int err;
   451	
   452		err = kstrtoull_from_user(ubuf, cnt, 10, &defer);
   453		if (err)
   454			return err;
   455	
   456		if (defer < 0 || defer > 1)
   457			return -EINVAL;
   458	
   459		raw_spin_rq_lock_irqsave(rq, flags);
   460		rq->fair_server_defer = defer;
   461		raw_spin_rq_unlock_irqrestore(rq, flags);
   462	
   463		*ppos += cnt;
   464		return cnt;
   465	}
   466	
   467	static int sched_fair_server_defer_show(struct seq_file *m, void *v)
   468	{
   469		unsigned long cpu = (unsigned long) m->private;
   470		struct rq *rq = cpu_rq(cpu);
   471	
   472		seq_printf(m, "%d\n", rq->fair_server_defer);
   473		return 0;
   474	}
   475	
   476	static int sched_fair_server_defer_open(struct inode *inode, struct file *filp)
   477	{
   478		return single_open(filp, sched_fair_server_defer_show, inode->i_private);
   479	}
   480	
   481	static const struct file_operations fair_server_defer_fops = {
   482		.open		= sched_fair_server_defer_open,
   483		.write		= sched_fair_server_defer_write,
   484		.read		= seq_read,
   485		.llseek		= seq_lseek,
   486		.release	= single_release,
   487	};
   488	
   489	static struct dentry *debugfs_sched;
   490	
 > 491	void debugfs_fair_server_init(void)
   492	{
   493		long cpu;
   494		struct dentry *rq_dentry;
   495	
   496		rq_dentry = debugfs_create_dir("rq", debugfs_sched);
   497		if (!rq_dentry)
   498			return;
   499	
   500		for_each_possible_cpu(cpu) {
   501			struct dentry *d_cpu;
   502			char buf[32];
   503	
   504			snprintf(buf, sizeof(buf), "cpu%ld", cpu);
   505			d_cpu = debugfs_create_dir(buf, rq_dentry);
   506	
   507			debugfs_create_file("fair_server_runtime", 0644, d_cpu, (void *) cpu, &fair_server_runtime_fops);
   508			debugfs_create_file("fair_server_period", 0644, d_cpu, (void *) cpu, &fair_server_period_fops);
   509			debugfs_create_file("fair_server_defer", 0644, d_cpu, (void *) cpu, &fair_server_defer_fops);
   510		}
   511	}
   512	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-09-01  2:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 20:28 [PATCH v4 0/7] SCHED_DEADLINE server infrastructure Daniel Bristot de Oliveira
2023-08-31 20:28 ` [PATCH v4 1/7] sched: Unify runtime accounting across classes Daniel Bristot de Oliveira
2023-09-15 21:41   ` Steven Rostedt
2023-08-31 20:28 ` [PATCH v4 2/7] sched/deadline: Collect sched_dl_entity initialization Daniel Bristot de Oliveira
2023-08-31 20:28 ` [PATCH v4 3/7] sched/deadline: Move bandwidth accounting into {en,de}queue_dl_entity Daniel Bristot de Oliveira
2023-08-31 20:28 ` [PATCH v4 4/7] sched/deadline: Introduce deadline servers Daniel Bristot de Oliveira
2023-08-31 20:28 ` [PATCH v4 5/7] sched/fair: Add trivial fair server Daniel Bristot de Oliveira
2023-08-31 20:28 ` [PATCH v4 6/7] sched/deadline: Deferrable dl server Daniel Bristot de Oliveira
2023-09-05 13:42   ` Peter Zijlstra
2023-09-05 15:24     ` Daniel Bristot de Oliveira
2023-09-06  8:29       ` Peter Zijlstra
2023-09-06 14:58         ` Daniel Bristot de Oliveira
2023-09-06 20:04           ` Peter Zijlstra
2023-09-06 20:08             ` Peter Zijlstra
2023-09-08 14:14               ` Daniel Bristot de Oliveira
2023-09-08 13:59             ` Daniel Bristot de Oliveira
2023-09-07  8:07           ` Peter Zijlstra
2023-09-08 15:28             ` Daniel Bristot de Oliveira
2023-09-08 16:11               ` Peter Zijlstra
2023-08-31 20:28 ` [PATCH v4 7/7] sched/fair: Fair server interface Daniel Bristot de Oliveira
2023-09-01  2:01   ` kernel test robot [this message]
2023-09-05 13:55   ` Peter Zijlstra
2023-09-05 16:17     ` Daniel Bristot de Oliveira
2023-09-06  7:25       ` Peter Zijlstra
2023-09-06  8:25         ` 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=202309010917.ryl6BbIf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bristot@kernel.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=joel@joelfernandes.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@santannapisa.it \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pauld@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@linutronix.de \
    --cc=tommaso.cucinotta@santannapisa.it \
    --cc=vincent.guittot@linaro.org \
    --cc=vineeth@bitbyteword.org \
    --cc=vschneid@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome