All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v14 045/138] mm/memcg: Add folio_memcg_lock() and folio_memcg_unlock()
Date: Fri, 16 Jul 2021 05:58:38 +0800	[thread overview]
Message-ID: <202107160556.hbwRoUva-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6576 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210715033704.692967-46-willy@infradead.org>
References: <20210715033704.692967-46-willy@infradead.org>
TO: "Matthew Wilcox (Oracle)" <willy@infradead.org>
TO: linux-kernel(a)vger.kernel.org
CC: "Matthew Wilcox (Oracle)" <willy@infradead.org>
CC: linux-mm(a)kvack.org
CC: linux-fsdevel(a)vger.kernel.org
CC: Christoph Hellwig <hch@lst.de>

Hi "Matthew,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc1 next-20210715]
[cannot apply to hnaz-linux-mm/master xfs-linux/for-next tip/perf/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]

url:    https://github.com/0day-ci/linux/commits/Matthew-Wilcox-Oracle/Memory-folios/20210715-133101
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8096acd7442e613fad0354fc8dfdb2003cceea0b
:::::: branch date: 16 hours ago
:::::: commit date: 16 hours ago
config: x86_64-randconfig-s021-20210715 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/3ec200aa142decc0104e2b10b58da2d9b333ab84
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Matthew-Wilcox-Oracle/Memory-folios/20210715-133101
        git checkout 3ec200aa142decc0104e2b10b58da2d9b333ab84
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
   mm/memcontrol.c:4127:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4127:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4127:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4129:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4129:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4129:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4285:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4285:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4285:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4379:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4379:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4379:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:5974:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:5974:23: sparse:    struct task_struct [noderef] __rcu *
   mm/memcontrol.c:5974:23: sparse:    struct task_struct *
   mm/memcontrol.c: note: in included file:
   include/linux/memcontrol.h:750:9: sparse: sparse: context imbalance in 'lock_page_lruvec' - wrong count at exit
   include/linux/memcontrol.h:750:9: sparse: sparse: context imbalance in 'lock_page_lruvec_irq' - wrong count at exit
   include/linux/memcontrol.h:750:9: sparse: sparse: context imbalance in 'lock_page_lruvec_irqsave' - wrong count at exit
>> mm/memcontrol.c:1977:6: sparse: sparse: context imbalance in 'folio_memcg_lock' - wrong count at exit
   mm/memcontrol.c:2031:17: sparse: sparse: context imbalance in '__folio_memcg_unlock' - unexpected unlock

vim +/folio_memcg_lock +1977 mm/memcontrol.c

3d8b38eb81cac8 Roman Gushchin          2018-08-21  1966  
d7365e783edb85 Johannes Weiner         2014-10-29  1967  /**
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15  1968)  * folio_memcg_lock - Bind a folio to its memcg.
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15  1969)  * @folio: The folio.
32047e2a85f066 KAMEZAWA Hiroyuki       2010-10-27  1970   *
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15  1971)  * This function prevents unlocked LRU folios from being moved to
739f79fc9db1b3 Johannes Weiner         2017-08-18  1972   * another cgroup.
739f79fc9db1b3 Johannes Weiner         2017-08-18  1973   *
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15  1974)  * It ensures lifetime of the bound memcg.  The caller is responsible
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15  1975)  * for the lifetime of the folio.
d7365e783edb85 Johannes Weiner         2014-10-29  1976   */
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15 @1977) void folio_memcg_lock(struct folio *folio)
89c06bd52fb9ff KAMEZAWA Hiroyuki       2012-03-21  1978  {
89c06bd52fb9ff KAMEZAWA Hiroyuki       2012-03-21  1979  	struct mem_cgroup *memcg;
6de226191d12fc Johannes Weiner         2015-02-11  1980  	unsigned long flags;
89c06bd52fb9ff KAMEZAWA Hiroyuki       2012-03-21  1981  
6de226191d12fc Johannes Weiner         2015-02-11  1982  	/*
6de226191d12fc Johannes Weiner         2015-02-11  1983  	 * The RCU lock is held throughout the transaction.  The fast
6de226191d12fc Johannes Weiner         2015-02-11  1984  	 * path can get away without acquiring the memcg->move_lock
6de226191d12fc Johannes Weiner         2015-02-11  1985  	 * because page moving starts with an RCU grace period.
6de226191d12fc Johannes Weiner         2015-02-11  1986           */
d7365e783edb85 Johannes Weiner         2014-10-29  1987  	rcu_read_lock();
d7365e783edb85 Johannes Weiner         2014-10-29  1988  
d7365e783edb85 Johannes Weiner         2014-10-29  1989  	if (mem_cgroup_disabled())
1c824a680b1b67 Johannes Weiner         2021-04-29  1990  		return;
89c06bd52fb9ff KAMEZAWA Hiroyuki       2012-03-21  1991  again:
3ec200aa142dec Matthew Wilcox (Oracle  2021-07-15  1992) 	memcg = folio_memcg(folio);
2983331575bfb2 Johannes Weiner         2014-12-10  1993  	if (unlikely(!memcg))
1c824a680b1b67 Johannes Weiner         2021-04-29  1994  		return;
d7365e783edb85 Johannes Weiner         2014-10-29  1995  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42660 bytes --]

             reply	other threads:[~2021-07-15 21:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 21:58 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-18 11:59 [PATCH v14 045/138] mm/memcg: Add folio_memcg_lock() and folio_memcg_unlock() kernel test robot
2021-07-15  3:34 [PATCH v14 000/138] Memory folios Matthew Wilcox (Oracle)
2021-07-15  3:35 ` [PATCH v14 045/138] mm/memcg: Add folio_memcg_lock() and folio_memcg_unlock() Matthew Wilcox (Oracle)
2021-07-21  9:45   ` Mike Rapoport
2021-08-10 20:28   ` David Howells
2021-08-11 13:17   ` Vlastimil Babka

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=202107160556.hbwRoUva-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.