Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1736524

Re: [PATCH 1/2] sched: Introduce new flags to sched_setaffinity to support soft affinity.

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] sched: Introduce new flags to sched_setaffinity to support soft affinity.
Date 2017-09-21 12:40 +0200
Message-ID <us73H-86N-1@gated-at.bofh.it> (permalink)
References <urzln-2Sr-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Rohit,

[auto build test WARNING on tip/sched/core]
[also build test WARNING on v4.14-rc1 next-20170921]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Rohit-Jain/sched-Introduce-new-flags-to-sched_setaffinity-to-support-soft-affinity/20170921-140313
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)


vim +299 kernel/trace/trace_hwlat.c

0330f7aa Steven Rostedt (Red Hat  2016-07-15  269) 
f447c196 Steven Rostedt (VMware   2017-01-31  270) static void move_to_next_cpu(void)
0330f7aa Steven Rostedt (Red Hat  2016-07-15  271) {
f447c196 Steven Rostedt (VMware   2017-01-31  272) 	struct cpumask *current_mask = &save_cpumask;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  273) 	int next_cpu;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  274) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15  275) 	if (disable_migrate)
0330f7aa Steven Rostedt (Red Hat  2016-07-15  276) 		return;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  277) 	/*
0330f7aa Steven Rostedt (Red Hat  2016-07-15  278) 	 * If for some reason the user modifies the CPU affinity
0330f7aa Steven Rostedt (Red Hat  2016-07-15  279) 	 * of this thread, than stop migrating for the duration
0330f7aa Steven Rostedt (Red Hat  2016-07-15  280) 	 * of the current test.
0330f7aa Steven Rostedt (Red Hat  2016-07-15  281) 	 */
0330f7aa Steven Rostedt (Red Hat  2016-07-15  282) 	if (!cpumask_equal(current_mask, &current->cpus_allowed))
0330f7aa Steven Rostedt (Red Hat  2016-07-15  283) 		goto disable;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  284) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15  285) 	get_online_cpus();
0330f7aa Steven Rostedt (Red Hat  2016-07-15  286) 	cpumask_and(current_mask, cpu_online_mask, tracing_buffer_mask);
0330f7aa Steven Rostedt (Red Hat  2016-07-15  287) 	next_cpu = cpumask_next(smp_processor_id(), current_mask);
0330f7aa Steven Rostedt (Red Hat  2016-07-15  288) 	put_online_cpus();
0330f7aa Steven Rostedt (Red Hat  2016-07-15  289) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15  290) 	if (next_cpu >= nr_cpu_ids)
0330f7aa Steven Rostedt (Red Hat  2016-07-15  291) 		next_cpu = cpumask_first(current_mask);
0330f7aa Steven Rostedt (Red Hat  2016-07-15  292) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15  293) 	if (next_cpu >= nr_cpu_ids) /* Shouldn't happen! */
0330f7aa Steven Rostedt (Red Hat  2016-07-15  294) 		goto disable;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  295) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15  296) 	cpumask_clear(current_mask);
0330f7aa Steven Rostedt (Red Hat  2016-07-15  297) 	cpumask_set_cpu(next_cpu, current_mask);
0330f7aa Steven Rostedt (Red Hat  2016-07-15  298) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15 @299) 	sched_setaffinity(0, current_mask);
0330f7aa Steven Rostedt (Red Hat  2016-07-15  300) 	return;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  301) 
0330f7aa Steven Rostedt (Red Hat  2016-07-15  302)  disable:
0330f7aa Steven Rostedt (Red Hat  2016-07-15  303) 	disable_migrate = true;
0330f7aa Steven Rostedt (Red Hat  2016-07-15  304) }
0330f7aa Steven Rostedt (Red Hat  2016-07-15  305) 

:::::: The code at line 299 was first introduced by commit
:::::: 0330f7aa8ee63d0c435c0cb4e47ea06235ee4b7f tracing: Have hwlat trace migrate across tracing_cpumask CPUs

:::::: TO: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
:::::: CC: Steven Rostedt <rostedt@goodmis.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] sched: Introduce new flags to sched_setaffinity to support soft affinity. Rohit Jain <rohit.k.jain@oracle.com> - 2017-09-20 00:40 +0200
  Re: [PATCH 1/2] sched: Introduce new flags to sched_setaffinity to  support soft affinity. kbuild test robot <lkp@intel.com> - 2017-09-21 12:40 +0200

csiph-web