public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v8 4/7] sched: Introduce affinity_context structure
       [not found] <20220908194121.858462-5-longman@redhat.com>
@ 2022-09-09  1:12 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-09-09  1:12 UTC (permalink / raw)
  To: Waiman Long, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	Tejun Heo, Zefan Li, Johannes Weiner, Will Deacon
  Cc: llvm, kbuild-all, linux-kernel, Lai Jiangshan, Waiman Long

Hi Waiman,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v6.0-rc4]
[cannot apply to tip/sched/core tip/master next-20220908]
[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/Waiman-Long/sched-Persistent-user-requested-affinity/20220909-034411
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 506357871c18e06565840d71c2ef9f818e19f460
config: arm-randconfig-r033-20220907 (https://download.01.org/0day-ci/archive/20220909/202209090937.23d2iFjb-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 1546df49f5a6d09df78f569e4137ddb365a3e827)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/039ce835b17cfa35f47f3cb5fd4938e57643cb63
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Waiman-Long/sched-Persistent-user-requested-affinity/20220909-034411
        git checkout 039ce835b17cfa35f47f3cb5fd4938e57643cb63
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/sched/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/sched/core.c:6602:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes]
   asmlinkage __visible void __sched schedule_user(void)
                                     ^
   kernel/sched/core.c:6602:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage __visible void __sched schedule_user(void)
                        ^
                        static 
>> kernel/sched/core.c:8104:40: error: too few arguments to function call, expected 3, have 2
           retval = __set_cpus_allowed_ptr(p, ctx);
                    ~~~~~~~~~~~~~~~~~~~~~~       ^
   kernel/sched/core.c:3555:19: note: '__set_cpus_allowed_ptr' declared here
   static inline int __set_cpus_allowed_ptr(struct task_struct *p,
                     ^
   kernel/sched/core.c:8972:26: warning: unused variable 'ac' [-Wunused-variable]
           struct affinity_context ac;
                                   ^
   2 warnings and 1 error generated.


vim +8104 kernel/sched/core.c

  8079	
  8080	static int
  8081	__sched_setaffinity(struct task_struct *p, struct affinity_context *ctx)
  8082	{
  8083		int retval;
  8084		cpumask_var_t cpus_allowed, new_mask;
  8085	
  8086		if (!alloc_cpumask_var(&cpus_allowed, GFP_KERNEL))
  8087			return -ENOMEM;
  8088	
  8089		if (!alloc_cpumask_var(&new_mask, GFP_KERNEL)) {
  8090			retval = -ENOMEM;
  8091			goto out_free_cpus_allowed;
  8092		}
  8093	
  8094		cpuset_cpus_allowed(p, cpus_allowed);
  8095		cpumask_and(new_mask, ctx->new_mask, cpus_allowed);
  8096	
  8097		ctx->new_mask = new_mask;
  8098		ctx->flags |= SCA_CHECK;
  8099	
  8100		retval = dl_task_check_affinity(p, new_mask);
  8101		if (retval)
  8102			goto out_free_new_mask;
  8103	again:
> 8104		retval = __set_cpus_allowed_ptr(p, ctx);
  8105		if (retval)
  8106			goto out_free_new_mask;
  8107	
  8108		cpuset_cpus_allowed(p, cpus_allowed);
  8109		if (!cpumask_subset(new_mask, cpus_allowed)) {
  8110			/*
  8111			 * We must have raced with a concurrent cpuset update.
  8112			 * Just reset the cpumask to the cpuset's cpus_allowed.
  8113			 */
  8114			cpumask_copy(new_mask, cpus_allowed);
  8115			goto again;
  8116		}
  8117	
  8118	out_free_new_mask:
  8119		free_cpumask_var(new_mask);
  8120	out_free_cpus_allowed:
  8121		free_cpumask_var(cpus_allowed);
  8122		return retval;
  8123	}
  8124	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-09  1:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220908194121.858462-5-longman@redhat.com>
2022-09-09  1:12 ` [PATCH v8 4/7] sched: Introduce affinity_context structure kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox