public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kairui Song <ryncsn@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 4/7] mm: introduce a generic per-CPU RSS cache
Date: Sun, 14 Aug 2022 05:48:25 +0800	[thread overview]
Message-ID: <202208140529.0Zdvh37T-lkp@intel.com> (raw)
In-Reply-To: <20220728204511.56348-5-ryncsn@gmail.com>

Hi Kairui,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on tip/sched/core]
[also build test WARNING on kees/for-next/execve tip/x86/core tip/x86/mm akpm-mm/mm-everything linus/master v5.19 next-20220812]
[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/Kairui-Song/Replace-per-task-RSS-cache-with-per-CPU-RSS-cache/20220729-044735
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 14b3f2d9ee8df3b6040f7e21f9fcd1d848938fd9
config: x86_64-randconfig-a002-20220801 (https://download.01.org/0day-ci/archive/20220814/202208140529.0Zdvh37T-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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
        # https://github.com/intel-lab-lkp/linux/commit/12685794635d61c342fae66ad77865b4eeada2e7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Kairui-Song/Replace-per-task-RSS-cache-with-per-CPU-RSS-cache/20220729-044735
        git checkout 12685794635d61c342fae66ad77865b4eeada2e7
        # 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=x86_64 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> mm/memory.c:222:6: warning: left operand of comma operator has no effect [-Wunused-value]
               + atomic_long_read(&mm->rss_stat.count[MM_ANONPAGES]),
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/memory.c:223:6: warning: expression result unused [-Wunused-value]
               + atomic_long_read(&mm->rss_stat.count[MM_SHMEMPAGES]);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/memory.c:234:4: warning: variable 'update' is uninitialized when used here [-Wuninitialized]
                           update += READ_ONCE(per_cpu(cpu_rss_cache.count[i], cpu));
                           ^~~~~~
   mm/memory.c:219:18: note: initialize the variable 'update' to silence this warning
           long ret, update, sync_count;
                           ^
                            = 0
   3 warnings generated.


vim +222 mm/memory.c

   214	
   215	/* see comment for get_mm_counter */
   216	unsigned long get_mm_rss(struct mm_struct *mm)
   217	{
   218		int cpu;
   219		long ret, update, sync_count;
   220	
   221		ret = atomic_long_read(&mm->rss_stat.count[MM_FILEPAGES]),
 > 222		    + atomic_long_read(&mm->rss_stat.count[MM_ANONPAGES]),
 > 223		    + atomic_long_read(&mm->rss_stat.count[MM_SHMEMPAGES]);
   224	
   225		for_each_possible_cpu(cpu) {
   226			if (READ_ONCE(per_cpu(cpu_rss_cache.mm, cpu)) != mm)
   227				continue;
   228			sync_count = READ_ONCE(per_cpu(cpu_rss_cache.sync_count, cpu));
   229			/* see smp_mb in switch_pcp_rss_cache_no_irq */
   230			smp_rmb();
   231	
   232			/* Reads MM_FILEPAGES, MM_ANONPAGES, MM_SHMEMPAGES */
   233			for (int i = MM_FILEPAGES; i < MM_SWAPENTS; i++)
 > 234				update += READ_ONCE(per_cpu(cpu_rss_cache.count[i], cpu));
   235	
   236			/* same as above */
   237			smp_rmb();
   238			if (READ_ONCE(per_cpu(cpu_rss_cache.sync_count, cpu)) == sync_count &&
   239			    READ_ONCE(per_cpu(cpu_rss_cache.mm, cpu)) == mm)
   240				ret += update;
   241		}
   242	
   243		if (ret < 0)
   244			ret = 0;
   245	
   246		return ret;
   247	}
   248	

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

           reply	other threads:[~2022-08-13 21:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220728204511.56348-5-ryncsn@gmail.com>]

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=202208140529.0Zdvh37T-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=ryncsn@gmail.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