public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH v7] sched: Fix performance regression introduced by mm_cid
Date: Mon, 17 Apr 2023 09:38:48 +0800	[thread overview]
Message-ID: <202304170916.wfhHZcvE-lkp@intel.com> (raw)
In-Reply-To: <20230416223217.191261-1-mathieu.desnoyers@efficios.com>

Hi Mathieu,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc7]
[cannot apply to tip/sched/core]
[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/Mathieu-Desnoyers/sched-Fix-performance-regression-introduced-by-mm_cid/20230417-063345
patch link:    https://lore.kernel.org/r/20230416223217.191261-1-mathieu.desnoyers%40efficios.com
patch subject: [RFC PATCH v7] sched: Fix performance regression introduced by mm_cid
config: riscv-randconfig-r042-20230417 (https://download.01.org/0day-ci/archive/20230417/202304170916.wfhHZcvE-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 9638da200e00bd069e6dd63604e14cbafede9324)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/3ab4bef6c0bd5b33395bbd475c423ba95b9763d6
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Mathieu-Desnoyers/sched-Fix-performance-regression-introduced-by-mm_cid/20230417-063345
        git checkout 3ab4bef6c0bd5b33395bbd475c423ba95b9763d6
        # 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=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash kernel/sched/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304170916.wfhHZcvE-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/sched/core.c:6744:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes]
   asmlinkage __visible void __sched schedule_user(void)
                                     ^
   kernel/sched/core.c:6744: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:11770:15: warning: variable 'next_scan' is uninitialized when used here [-Wuninitialized]
                           old_scan = next_scan;
                                      ^~~~~~~~~
   kernel/sched/core.c:11764:31: note: initialize the variable 'next_scan' to silence this warning
                   unsigned long res, next_scan;
                                               ^
                                                = 0
   kernel/sched/core.c:1689:1: warning: unused function 'uclamp_update_active' [-Wunused-function]
   uclamp_update_active(struct task_struct *p)
   ^
   kernel/sched/core.c:6448:20: warning: unused function 'sched_core_cpu_deactivate' [-Wunused-function]
   static inline void sched_core_cpu_deactivate(unsigned int cpu) {}
                      ^
   4 warnings generated.


vim +/next_scan +11770 kernel/sched/core.c

 11743	
 11744	static void task_mm_cid_work(struct callback_head *work)
 11745	{
 11746		struct task_struct *t = current;
 11747		struct mm_struct *mm;
 11748		int cpu;
 11749		unsigned long now = jiffies, old_scan, next_scan;
 11750		struct cpumask *cidmask;
 11751		int weight;
 11752	
 11753		SCHED_WARN_ON(t != container_of(work, struct task_struct, cid_work));
 11754	
 11755		work->next = work;	/* Prevent double-add */
 11756		if (t->flags & PF_EXITING)
 11757			return;
 11758		mm = t->mm;
 11759		if (!mm)
 11760			return;
 11761		old_scan = READ_ONCE(mm->mm_cid_next_scan);
 11762		next_scan = now + msecs_to_jiffies(MM_CID_SCAN_DELAY);
 11763		if (!old_scan) {
 11764			unsigned long res, next_scan;
 11765	
 11766			res = cmpxchg(&mm->mm_cid_next_scan, old_scan, next_scan);
 11767			if (res != old_scan)
 11768				old_scan = res;
 11769			else
 11770				old_scan = next_scan;
 11771		}
 11772		if (time_before(now, old_scan))
 11773			return;
 11774		if (!try_cmpxchg(&mm->mm_cid_next_scan, &old_scan, next_scan))
 11775			return;
 11776		cidmask = mm_cidmask(mm);
 11777		/* Clear cids that were not recently used. */
 11778		for_each_possible_cpu(cpu)
 11779			sched_mm_cid_remote_clear_old(mm, cpu);
 11780		weight = cpumask_weight(cidmask);
 11781		/*
 11782		 * Clear cids that are greater or equal to the cidmask weight to
 11783		 * recompact it.
 11784		 */
 11785		for_each_possible_cpu(cpu)
 11786			sched_mm_cid_remote_clear_weight(mm, cpu, weight);
 11787	}
 11788	

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

       reply	other threads:[~2023-04-17  1:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230416223217.191261-1-mathieu.desnoyers@efficios.com>
2023-04-17  1:38 ` kernel test robot [this message]
2023-04-17  1:49 ` [RFC PATCH v7] sched: Fix performance regression introduced by mm_cid kernel test robot

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=202304170916.wfhHZcvE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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