All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mina Almasry <almasrymina@google.com>
Cc: kbuild-all@lists.01.org, Mina Almasry <almasrymina@google.com>,
	Michal Hocko <mhocko@suse.com>, Theodore Ts'o <tytso@mit.edu>,
	Greg Thelen <gthelen@google.com>,
	Shakeel Butt <shakeelb@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Hugh Dickins <hughd@google.com>, Roman Gushchin <guro@fb.com>,
	Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH v2 1/4] mm/shmem: support deterministic charging of tmpfs
Date: Fri, 12 Nov 2021 00:53:10 +0800	[thread overview]
Message-ID: <202111120048.YbSLKOz5-lkp@intel.com> (raw)
In-Reply-To: <20211110211951.3730787-2-almasrymina@google.com>

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

Hi Mina,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/0day-ci/linux/commits/Mina-Almasry/mm-shmem-support-deterministic-charging-of-tmpfs/20211111-062122
base:   https://github.com/hnaz/linux-mm master
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/aaf0e3e0832977b6eb257e1ed27747cf97c479d4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mina-Almasry/mm-shmem-support-deterministic-charging-of-tmpfs/20211111-062122
        git checkout aaf0e3e0832977b6eb257e1ed27747cf97c479d4
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   mm/shmem.c:118:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
     118 | #if CONFIG_MEMCG
         |     ^~~~~~~~~~~~
   mm/shmem.c: In function 'shmem_add_to_page_cache':
>> mm/shmem.c:721:25: error: dereferencing pointer to incomplete type 'struct mem_cgroup'
     721 |    css_put(&remote_memcg->css);
         |                         ^~
   mm/shmem.c: In function 'shmem_parse_one':
   mm/shmem.c:3410:21: warning: unused variable 'memcg' [-Wunused-variable]
    3410 |  struct mem_cgroup *memcg;
         |                     ^~~~~
   mm/shmem.c: In function 'shmem_reconfigure':
   mm/shmem.c:3616:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
    3616 | #if CONFIG_MEMCG
         |     ^~~~~~~~~~~~
   mm/shmem.c: In function 'shmem_fill_super':
   mm/shmem.c:3772:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
    3772 | #if CONFIG_MEMCG
         |     ^~~~~~~~~~~~
--
   fs/super.c: In function 'destroy_unused_super':
>> fs/super.c:184:33: error: 'struct super_block' has no member named 's_memcg_to_charge'
     184 |  mem_cgroup_set_charge_target(&s->s_memcg_to_charge, NULL);
         |                                 ^~
   fs/super.c: In function '__put_super':
   fs/super.c:297:34: error: 'struct super_block' has no member named 's_memcg_to_charge'
     297 |   mem_cgroup_set_charge_target(&s->s_memcg_to_charge, NULL);
         |                                  ^~


vim +721 mm/shmem.c

   691	
   692	/*
   693	 * Like add_to_page_cache_locked, but error if expected item has gone.
   694	 */
   695	static int shmem_add_to_page_cache(struct page *page,
   696					   struct address_space *mapping,
   697					   pgoff_t index, void *expected, gfp_t gfp,
   698					   struct mm_struct *charge_mm)
   699	{
   700		XA_STATE_ORDER(xas, &mapping->i_pages, index, compound_order(page));
   701		unsigned long i = 0;
   702		unsigned long nr = compound_nr(page);
   703		int error;
   704		struct mem_cgroup *remote_memcg;
   705	
   706		VM_BUG_ON_PAGE(PageTail(page), page);
   707		VM_BUG_ON_PAGE(index != round_down(index, nr), page);
   708		VM_BUG_ON_PAGE(!PageLocked(page), page);
   709		VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
   710		VM_BUG_ON(expected && PageTransHuge(page));
   711	
   712		page_ref_add(page, nr);
   713		page->mapping = mapping;
   714		page->index = index;
   715	
   716		if (!PageSwapCache(page)) {
   717			remote_memcg = mem_cgroup_mapping_get_charge_target(mapping);
   718			if (remote_memcg) {
   719				error = mem_cgroup_charge_memcg(page_folio(page),
   720								remote_memcg, gfp);
 > 721				css_put(&remote_memcg->css);
   722			} else
   723				error = mem_cgroup_charge(page_folio(page), charge_mm,
   724							  gfp);
   725			if (error) {
   726				if (PageTransHuge(page)) {
   727					count_vm_event(THP_FILE_FALLBACK);
   728					count_vm_event(THP_FILE_FALLBACK_CHARGE);
   729				}
   730				goto error;
   731			}
   732		}
   733		cgroup_throttle_swaprate(page, gfp);
   734	
   735		do {
   736			void *entry;
   737			xas_lock_irq(&xas);
   738			entry = xas_find_conflict(&xas);
   739			if (entry != expected)
   740				xas_set_err(&xas, -EEXIST);
   741			xas_create_range(&xas);
   742			if (xas_error(&xas))
   743				goto unlock;
   744	next:
   745			xas_store(&xas, page);
   746			if (++i < nr) {
   747				xas_next(&xas);
   748				goto next;
   749			}
   750			if (PageTransHuge(page)) {
   751				count_vm_event(THP_FILE_ALLOC);
   752				__mod_lruvec_page_state(page, NR_SHMEM_THPS, nr);
   753			}
   754			mapping->nrpages += nr;
   755			__mod_lruvec_page_state(page, NR_FILE_PAGES, nr);
   756			__mod_lruvec_page_state(page, NR_SHMEM, nr);
   757	unlock:
   758			xas_unlock_irq(&xas);
   759		} while (xas_nomem(&xas, gfp));
   760	
   761		if (xas_error(&xas)) {
   762			error = xas_error(&xas);
   763			goto error;
   764		}
   765	
   766		return 0;
   767	error:
   768		page->mapping = NULL;
   769		page_ref_sub(page, nr);
   770		return error;
   771	}
   772	

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 1/4] mm/shmem: support deterministic charging of tmpfs
Date: Fri, 12 Nov 2021 00:53:10 +0800	[thread overview]
Message-ID: <202111120048.YbSLKOz5-lkp@intel.com> (raw)
In-Reply-To: <20211110211951.3730787-2-almasrymina@google.com>

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

Hi Mina,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/0day-ci/linux/commits/Mina-Almasry/mm-shmem-support-deterministic-charging-of-tmpfs/20211111-062122
base:   https://github.com/hnaz/linux-mm master
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/aaf0e3e0832977b6eb257e1ed27747cf97c479d4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mina-Almasry/mm-shmem-support-deterministic-charging-of-tmpfs/20211111-062122
        git checkout aaf0e3e0832977b6eb257e1ed27747cf97c479d4
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   mm/shmem.c:118:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
     118 | #if CONFIG_MEMCG
         |     ^~~~~~~~~~~~
   mm/shmem.c: In function 'shmem_add_to_page_cache':
>> mm/shmem.c:721:25: error: dereferencing pointer to incomplete type 'struct mem_cgroup'
     721 |    css_put(&remote_memcg->css);
         |                         ^~
   mm/shmem.c: In function 'shmem_parse_one':
   mm/shmem.c:3410:21: warning: unused variable 'memcg' [-Wunused-variable]
    3410 |  struct mem_cgroup *memcg;
         |                     ^~~~~
   mm/shmem.c: In function 'shmem_reconfigure':
   mm/shmem.c:3616:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
    3616 | #if CONFIG_MEMCG
         |     ^~~~~~~~~~~~
   mm/shmem.c: In function 'shmem_fill_super':
   mm/shmem.c:3772:5: warning: "CONFIG_MEMCG" is not defined, evaluates to 0 [-Wundef]
    3772 | #if CONFIG_MEMCG
         |     ^~~~~~~~~~~~
--
   fs/super.c: In function 'destroy_unused_super':
>> fs/super.c:184:33: error: 'struct super_block' has no member named 's_memcg_to_charge'
     184 |  mem_cgroup_set_charge_target(&s->s_memcg_to_charge, NULL);
         |                                 ^~
   fs/super.c: In function '__put_super':
   fs/super.c:297:34: error: 'struct super_block' has no member named 's_memcg_to_charge'
     297 |   mem_cgroup_set_charge_target(&s->s_memcg_to_charge, NULL);
         |                                  ^~


vim +721 mm/shmem.c

   691	
   692	/*
   693	 * Like add_to_page_cache_locked, but error if expected item has gone.
   694	 */
   695	static int shmem_add_to_page_cache(struct page *page,
   696					   struct address_space *mapping,
   697					   pgoff_t index, void *expected, gfp_t gfp,
   698					   struct mm_struct *charge_mm)
   699	{
   700		XA_STATE_ORDER(xas, &mapping->i_pages, index, compound_order(page));
   701		unsigned long i = 0;
   702		unsigned long nr = compound_nr(page);
   703		int error;
   704		struct mem_cgroup *remote_memcg;
   705	
   706		VM_BUG_ON_PAGE(PageTail(page), page);
   707		VM_BUG_ON_PAGE(index != round_down(index, nr), page);
   708		VM_BUG_ON_PAGE(!PageLocked(page), page);
   709		VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
   710		VM_BUG_ON(expected && PageTransHuge(page));
   711	
   712		page_ref_add(page, nr);
   713		page->mapping = mapping;
   714		page->index = index;
   715	
   716		if (!PageSwapCache(page)) {
   717			remote_memcg = mem_cgroup_mapping_get_charge_target(mapping);
   718			if (remote_memcg) {
   719				error = mem_cgroup_charge_memcg(page_folio(page),
   720								remote_memcg, gfp);
 > 721				css_put(&remote_memcg->css);
   722			} else
   723				error = mem_cgroup_charge(page_folio(page), charge_mm,
   724							  gfp);
   725			if (error) {
   726				if (PageTransHuge(page)) {
   727					count_vm_event(THP_FILE_FALLBACK);
   728					count_vm_event(THP_FILE_FALLBACK_CHARGE);
   729				}
   730				goto error;
   731			}
   732		}
   733		cgroup_throttle_swaprate(page, gfp);
   734	
   735		do {
   736			void *entry;
   737			xas_lock_irq(&xas);
   738			entry = xas_find_conflict(&xas);
   739			if (entry != expected)
   740				xas_set_err(&xas, -EEXIST);
   741			xas_create_range(&xas);
   742			if (xas_error(&xas))
   743				goto unlock;
   744	next:
   745			xas_store(&xas, page);
   746			if (++i < nr) {
   747				xas_next(&xas);
   748				goto next;
   749			}
   750			if (PageTransHuge(page)) {
   751				count_vm_event(THP_FILE_ALLOC);
   752				__mod_lruvec_page_state(page, NR_SHMEM_THPS, nr);
   753			}
   754			mapping->nrpages += nr;
   755			__mod_lruvec_page_state(page, NR_FILE_PAGES, nr);
   756			__mod_lruvec_page_state(page, NR_SHMEM, nr);
   757	unlock:
   758			xas_unlock_irq(&xas);
   759		} while (xas_nomem(&xas, gfp));
   760	
   761		if (xas_error(&xas)) {
   762			error = xas_error(&xas);
   763			goto error;
   764		}
   765	
   766		return 0;
   767	error:
   768		page->mapping = NULL;
   769		page_ref_sub(page, nr);
   770		return error;
   771	}
   772	

---
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: 9939 bytes --]

  reply	other threads:[~2021-11-11 16:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211110211951.3730787-1-almasrymina@google.com>
2021-11-10 21:19 ` [PATCH v2 1/4] mm/shmem: support deterministic charging of tmpfs Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-11 16:53   ` kernel test robot [this message]
2021-11-11 16:53     ` kernel test robot
2021-11-11 17:16   ` kernel test robot
2021-11-11 17:16     ` kernel test robot
2021-11-10 21:19 ` [PATCH v2 2/4] mm/oom: handle remote ooms Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-11 17:15   ` kernel test robot
2021-11-11 17:15     ` kernel test robot
2021-11-10 21:19 ` [PATCH v2 3/4] mm, shmem: add tmpfs memcg= option documentation Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-10 21:19 ` [PATCH v2 4/4] mm, shmem, selftests: add tmpfs memcg= mount option tests Mina Almasry
2021-11-10 21:19   ` Mina Almasry
2021-11-10 21:19   ` Mina Almasry

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=202111120048.YbSLKOz5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=david@fromorbit.com \
    --cc=gthelen@google.com \
    --cc=guro@fb.com \
    --cc=hughd@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shakeelb@google.com \
    --cc=tytso@mit.edu \
    /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.