linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <llong@redhat.com>
To: kernel test robot <lkp@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Tejun Heo <tj@kernel.org>,
	Christoph Lameter <cl@linux-foundation.org>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH 5/5] mm/memcg: Optimize user context object stock access
Date: Mon, 12 Apr 2021 10:07:56 -0400	[thread overview]
Message-ID: <6eb573b6-313e-6a3b-a37b-1df2ce55c58d@redhat.com> (raw)
In-Reply-To: <202104101336.WgwS18rl-lkp@intel.com>

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-Reduce-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 dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
> 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 arm64 cross compiling tool for clang build
>          # apt-get install binutils-aarch64-linux-gnu
>          # https://github.com/0day-ci/linux/commit/1f4e22fce44599095a55535301ca83adc5d3a4fe
>          git remote add linux-review https://github.com/0day-ci/linux
>          git fetch --no-tags linux-review Waiman-Long/mm-memcg-Reduce-kmemcache-memory-accounting-overhead/20210410-071958
>          git checkout 1f4e22fce44599095a55535301ca83adc5d3a4fe
>          # save the attached .config to linux build tree
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> mm/memcontrol.c:3234:10: warning: variable 'stock' is uninitialized when used here [-Wuninitialized]
>             stock = get_obj_stock(flags);
>                     ^~~~~~~~~~~~~~~~~~~~
>     mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
>                     obj_stock = &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 when used here [-Wuninitialized]
>             get_obj_stock(flags);
>             ^~~~~~~~~~~~~~~~~~~~
>     mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
>                     obj_stock = &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 when used here [-Wuninitialized]
>             get_obj_stock(flags);
>             ^~~~~~~~~~~~~~~~~~~~
>     mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
>                     obj_stock = &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 when used here [-Wuninitialized]
>             get_obj_stock(flags);
>             ^~~~~~~~~~~~~~~~~~~~
>     mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
>                     obj_stock = &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 = false;
>    3233	
>> 3234		stock = get_obj_stock(flags);
>    3235	
>    3236		stock = current_obj_stock();
>    3237		if (objcg == stock->cached_objcg && stock->nr_bytes >= nr_bytes) {
>    3238			stock->nr_bytes -= nr_bytes;
>    3239			ret = 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@lists.01.org

My bad, I somehow missed it. I will fix that in the version.

Thanks,
Longman



  reply	other threads:[~2021-04-12 14:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 23:18 [PATCH 0/5] mm/memcg: Reduce kmemcache memory accounting overhead Waiman Long
2021-04-09 23:18 ` [PATCH 1/5] mm/memcg: Pass both memcg and lruvec to mod_memcg_lruvec_state() Waiman Long
2021-04-12 18:04   ` Roman Gushchin
2021-04-12 19:24     ` Waiman Long
2021-04-12 19:22   ` Shakeel Butt
2021-04-09 23:18 ` [PATCH 2/5] mm/memcg: Introduce obj_cgroup_uncharge_mod_state() Waiman Long
2021-04-12 15:50   ` Shakeel Butt
2021-04-12 18:10   ` Roman Gushchin
2021-04-09 23:18 ` [PATCH 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp Waiman Long
2021-04-12 18:22   ` Roman Gushchin
2021-04-12 19:30     ` Waiman Long
2021-04-09 23:18 ` [PATCH 4/5] mm/memcg: Separate out object stock data into its own struct Waiman Long
2021-04-12 18:53   ` Roman Gushchin
2021-04-09 23:18 ` [PATCH 5/5] mm/memcg: Optimize user context object stock access Waiman Long
2021-04-10  6:07   ` kernel test robot
2021-04-12 14:07     ` Waiman Long [this message]
2021-04-12 18:55   ` Roman Gushchin
2021-04-12 19:58     ` Waiman Long
2021-04-10  1:51 ` [PATCH 0/5] mm/memcg: Reduce kmemcache memory accounting overhead Roman Gushchin
2021-04-12 14:03   ` Waiman Long
2021-04-12 17:47     ` Roman Gushchin
2021-04-12 19:20       ` Waiman Long
2021-04-12 19:05 ` Roman Gushchin
2021-04-12 19:51   ` Waiman Long

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=6eb573b6-313e-6a3b-a37b-1df2ce55c58d@redhat.com \
    --to=llong@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mhocko@kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=tj@kernel.org \
    --cc=vdavydov.dev@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;
as well as URLs for NNTP newsgroup(s).