linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Yu Zhao <yuzhao@google.com>
Cc: kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, n.borisov.lkml@gmail.com
Subject: Re: [PATCH v2] memcg: refactor mem_cgroup_resize_limit()
Date: Mon, 5 Jun 2017 05:12:19 +0800	[thread overview]
Message-ID: <201706050543.rtaURFDY%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170604200437.17815-1-yuzhao@google.com>

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

Hi Yu,

[auto build test ERROR on mmotm/master]
[also build test ERROR on v4.12-rc3 next-20170602]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Yu-Zhao/memcg-refactor-mem_cgroup_resize_limit/20170605-041444
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: x86_64-randconfig-x019-201723 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   mm/memcontrol.c: In function 'mem_cgroup_resize_limit':
>> mm/memcontrol.c:2453:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
      if (inverted)
      ^~
   mm/memcontrol.c:2455:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
       ret = -EINVAL;
       ^~~
>> mm/memcontrol.c:2458:3: error: expected 'while' before 'if'
      if (limit > counter->limit)
      ^~
>> mm/memcontrol.c:2464:4: error: break statement not within loop or switch
       break;
       ^~~~~
   mm/memcontrol.c:2428:7: warning: unused variable 'enlarge' [-Wunused-variable]
     bool enlarge = false;
          ^~~~~~~
>> mm/memcontrol.c:2474:2: warning: no return statement in function returning non-void [-Wreturn-type]
     } while (retry_count);
     ^
   mm/memcontrol.c: At top level:
>> mm/memcontrol.c:2474:4: error: expected identifier or '(' before 'while'
     } while (retry_count);
       ^~~~~
>> mm/memcontrol.c:2476:2: error: expected identifier or '(' before 'if'
     if (!ret && enlarge)
     ^~
>> mm/memcontrol.c:2479:2: error: expected identifier or '(' before 'return'
     return ret;
     ^~~~~~
>> mm/memcontrol.c:2480:1: error: expected identifier or '(' before '}' token
    }
    ^

vim +2458 mm/memcontrol.c

  2422	
  2423	static int mem_cgroup_resize_limit(struct mem_cgroup *memcg,
  2424					   unsigned long limit, bool memsw)
  2425	{
  2426		unsigned long curusage;
  2427		unsigned long oldusage;
> 2428		bool enlarge = false;
  2429		int retry_count;
  2430		int ret;
  2431		bool inverted;
  2432		struct page_counter *counter = memsw ? &memcg->memsw : &memcg->memory;
  2433	
  2434		/*
  2435		 * For keeping hierarchical_reclaim simple, how long we should retry
  2436		 * is depends on callers. We set our retry-count to be function
  2437		 * of # of children which we should visit in this loop.
  2438		 */
  2439		retry_count = MEM_CGROUP_RECLAIM_RETRIES *
  2440			      mem_cgroup_count_children(memcg);
  2441	
  2442		oldusage = page_counter_read(counter);
  2443	
  2444		do {
  2445			if (signal_pending(current)) {
  2446				ret = -EINTR;
  2447				break;
  2448			}
  2449	
  2450			mutex_lock(&memcg_limit_mutex);
  2451			inverted = memsw ? limit < memcg->memory.limit :
  2452					   limit > memcg->memsw.limit;
> 2453			if (inverted)
  2454				mutex_unlock(&memcg_limit_mutex);
  2455				ret = -EINVAL;
  2456				break;
  2457			}
> 2458			if (limit > counter->limit)
  2459				enlarge = true;
  2460			ret = page_counter_limit(counter, limit);
  2461			mutex_unlock(&memcg_limit_mutex);
  2462	
  2463			if (!ret)
> 2464				break;
  2465	
  2466			try_to_free_mem_cgroup_pages(memcg, 1, GFP_KERNEL, !memsw);
  2467	
  2468			curusage = page_counter_read(counter);
  2469			/* Usage is reduced ? */
  2470			if (curusage >= oldusage)
  2471				retry_count--;
  2472			else
  2473				oldusage = curusage;
> 2474		} while (retry_count);
  2475	
> 2476		if (!ret && enlarge)
  2477			memcg_oom_recover(memcg);
  2478	
> 2479		return ret;
> 2480	}
  2481	
  2482	unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
  2483						    gfp_t gfp_mask,

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  parent reply	other threads:[~2017-06-04 21:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 23:02 [PATCH] " Yu Zhao
2017-06-02  7:32 ` Nikolay Borisov
2017-06-04 19:44   ` Yu Zhao
2017-06-03 15:15 ` Vladimir Davydov
2017-06-04 20:04 ` [PATCH v2] " Yu Zhao
2017-06-04 20:09   ` Vladimir Davydov
2017-06-04 20:31     ` Yu Zhao
2017-06-04 21:00   ` kbuild test robot
2017-06-04 21:12   ` kbuild test robot [this message]
2017-06-04 21:18 ` [PATCH v3] " Yu Zhao
2017-06-13 11:35   ` Michal Hocko
2017-06-14 21:20 ` [PATCH v4] " Yu Zhao
2018-01-08 22:42 ` Yu Zhao

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=201706050543.rtaURFDY%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=n.borisov.lkml@gmail.com \
    --cc=vdavydov.dev@gmail.com \
    --cc=yuzhao@google.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