Content-Type: multipart/mixed; boundary="===============1277925791481964701==" MIME-Version: 1.0 From: Waiman Long To: kbuild-all@lists.01.org Subject: Re: [PATCH 5/5] mm/memcg: Optimize user context object stock access Date: Mon, 12 Apr 2021 10:07:56 -0400 Message-ID: <6eb573b6-313e-6a3b-a37b-1df2ce55c58d@redhat.com> In-Reply-To: <202104101336.WgwS18rl-lkp@intel.com> List-Id: --===============1277925791481964701== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 4/10/21 2:07 AM, kernel test robot wrote: > Hi Waiman, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on dennis-percpu/for-next] > [also build test WARNING on linus/master v5.12-rc6 next-20210409] > [cannot apply to hnaz-linux-mm/master] > [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] > > url: https://github.com/0day-ci/linux/commits/Waiman-Long/mm-memcg-Red= uce-kmemcache-memory-accounting-overhead/20210410-071958 > base: https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git= for-next > config: arm64-randconfig-r031-20210409 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd45= 3a1389b6a7e6d9214b449d3c54981b1a89b6) > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sb= in/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install arm64 cross compiling tool for clang build > # apt-get install binutils-aarch64-linux-gnu > # https://github.com/0day-ci/linux/commit/1f4e22fce44599095a5553= 5301ca83adc5d3a4fe > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Waiman-Long/mm-memcg-Reduce-kme= mcache-memory-accounting-overhead/20210410-071958 > git checkout 1f4e22fce44599095a55535301ca83adc5d3a4fe > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross A= RCH=3Darm64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > >>> mm/memcontrol.c:3234:10: warning: variable 'stock' is uninitialized whe= n used here [-Wuninitialized] > stock =3D get_obj_stock(flags); > ^~~~~~~~~~~~~~~~~~~~ > mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock' > obj_stock =3D &stock->task_obj; \ > ^~~~~ > mm/memcontrol.c:3234:10: note: variable 'stock' is declared here > mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock' > struct memcg_stock_pcp *stock; \ > ^ > mm/memcontrol.c:3329:2: warning: variable 'stock' is uninitialized wh= en used here [-Wuninitialized] > get_obj_stock(flags); > ^~~~~~~~~~~~~~~~~~~~ > mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock' > obj_stock =3D &stock->task_obj; \ > ^~~~~ > mm/memcontrol.c:3329:2: note: variable 'stock' is declared here > mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock' > struct memcg_stock_pcp *stock; \ > ^ > mm/memcontrol.c:3371:2: warning: variable 'stock' is uninitialized wh= en used here [-Wuninitialized] > get_obj_stock(flags); > ^~~~~~~~~~~~~~~~~~~~ > mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock' > obj_stock =3D &stock->task_obj; \ > ^~~~~ > mm/memcontrol.c:3371:2: note: variable 'stock' is declared here > mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock' > struct memcg_stock_pcp *stock; \ > ^ > mm/memcontrol.c:3426:2: warning: variable 'stock' is uninitialized wh= en used here [-Wuninitialized] > get_obj_stock(flags); > ^~~~~~~~~~~~~~~~~~~~ > mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock' > obj_stock =3D &stock->task_obj; \ > ^~~~~ > mm/memcontrol.c:3426:2: note: variable 'stock' is declared here > mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock' > struct memcg_stock_pcp *stock; \ > ^ > 4 warnings generated. > > > vim +/stock +3234 mm/memcontrol.c > > 3227 = > 3228 static bool consume_obj_stock(struct obj_cgroup *objcg, unsigned = int nr_bytes) > 3229 { > 3230 struct obj_stock *stock; > 3231 unsigned long flags; > 3232 bool ret =3D false; > 3233 = >> 3234 stock =3D get_obj_stock(flags); > 3235 = > 3236 stock =3D current_obj_stock(); > 3237 if (objcg =3D=3D stock->cached_objcg && stock->nr_bytes >=3D nr_= bytes) { > 3238 stock->nr_bytes -=3D nr_bytes; > 3239 ret =3D true; > 3240 } > 3241 = > 3242 put_obj_stock(flags); > 3243 = > 3244 return ret; > 3245 } > 3246 = > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org My bad, I somehow missed it. I will fix that in the version. Thanks, Longman --===============1277925791481964701==--