mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Nadav Amit <namit@vmware.com>
Cc: kbuild-all@01.org, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Nadav Amit <namit@vmware.com>
Subject: Re: [PATCH 08/19] vmw_balloon: refactor change size from vmballoon_work
Date: Tue, 18 Sep 2018 16:09:00 +0800	[thread overview]
Message-ID: <201809181612.E5Y7onI9%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180918063853.198332-9-namit@vmware.com>

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

Hi Nadav,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.19-rc4 next-20180913]
[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/Nadav-Amit/vmw_balloon-compaction-shrinker-64-bit-etc/20180918-152302
config: x86_64-randconfig-x007-201837 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/export.h:45:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:7,
                    from drivers/misc/vmw_balloon.c:20:
   drivers/misc/vmw_balloon.c: In function 'vmballoon_change.isra.2':
   include/linux/compiler.h:358:38: error: call to '__compiletime_assert_659' declared with attribute error: BUILD_BUG failed
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/misc/vmw_balloon.c:659:2: note: in expansion of macro 'if'
     if (target < size && size - target < HPAGE_PMD_NR && target != 0)
     ^~
   include/linux/compiler.h:346:2: note: in expansion of macro '__compiletime_assert'
     __compiletime_assert(condition, msg, prefix, suffix)
     ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:79:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
    #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                        ^~~~~~~~~~~~~~~~
   include/linux/huge_mm.h:250:28: note: in expansion of macro 'BUILD_BUG'
    #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
                               ^~~~~~~~~
   include/linux/huge_mm.h:80:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
    #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
                             ^~~~~~~~~~~~~~~
   include/linux/huge_mm.h:81:26: note: in expansion of macro 'HPAGE_PMD_ORDER'
    #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
                             ^~~~~~~~~~~~~~~
   drivers/misc/vmw_balloon.c:659:39: note: in expansion of macro 'HPAGE_PMD_NR'
     if (target < size && size - target < HPAGE_PMD_NR && target != 0)
                                          ^~~~~~~~~~~~
   In file included from include/linux/mm.h:10:0,
                    from drivers/misc/vmw_balloon.c:21:
   In function 'vmballoon_alloc_page',
       inlined from 'vmballoon_inflate' at drivers/misc/vmw_balloon.c:702:8,
       inlined from 'vmballoon_work' at drivers/misc/vmw_balloon.c:971:4:
   include/linux/compiler.h:358:38: error: call to '__compiletime_assert_389' declared with attribute error: BUILD_BUG failed
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/gfp.h:518:46: note: in definition of macro 'alloc_pages'
      alloc_pages_node(numa_node_id(), gfp_mask, order)
                                                 ^~~~~
   include/linux/compiler.h:346:2: note: in expansion of macro '__compiletime_assert'
     __compiletime_assert(condition, msg, prefix, suffix)
     ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:79:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
    #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                        ^~~~~~~~~~~~~~~~
   include/linux/huge_mm.h:250:28: note: in expansion of macro 'BUILD_BUG'
    #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
                               ^~~~~~~~~
   include/linux/huge_mm.h:80:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
    #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
                             ^~~~~~~~~~~~~~~
   drivers/misc/vmw_balloon.c:389:49: note: in expansion of macro 'HPAGE_PMD_ORDER'
      return alloc_pages(VMW_HUGE_PAGE_ALLOC_FLAGS, HPAGE_PMD_ORDER);
                                                    ^~~~~~~~~~~~~~~

vim +/if +659 drivers/misc/vmw_balloon.c

   634	
   635	/**
   636	 * vmballoon_change - retrieve the required balloon change
   637	 *
   638	 * @b: pointer for the balloon.
   639	 *
   640	 * Return: the required change for the balloon size. A positive number
   641	 * indicates inflation, a negative number indicates a deflation.
   642	 */
   643	static int64_t vmballoon_change(struct vmballoon *b)
   644	{
   645		int64_t size, target;
   646	
   647		size = b->size;
   648		target = b->target;
   649	
   650		/*
   651		 * We must cast first because of int sizes
   652		 * Otherwise we might get huge positives instead of negatives
   653		 */
   654	
   655		if (b->reset_required)
   656			return 0;
   657	
   658		/* consider a 2MB slack on deflate, unless the balloon is emptied */
 > 659		if (target < size && size - target < HPAGE_PMD_NR && target != 0)
   660			return 0;
   661	
   662		return target - size;
   663	}
   664	

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

  reply	other threads:[~2018-09-18  8:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  6:38 [PATCH 00/19] vmw_balloon: compaction, shrinker, 64-bit, etc Nadav Amit
2018-09-18  6:38 ` [PATCH 01/19] vmw_balloon: handle commands in a single function Nadav Amit
2018-09-18  6:38 ` [PATCH 02/19] vmw_balloon: unify commands tracing and stats Nadav Amit
2018-09-18  6:38 ` [PATCH 03/19] vmw_balloon: merge send_lock and send_unlock path Nadav Amit
2018-09-18  6:38 ` [PATCH 04/19] vmw_balloon: simplifying batch access Nadav Amit
2018-09-18  6:38 ` [PATCH 05/19] vmw_balloon: remove sleeping allocations Nadav Amit
2018-09-18 10:01   ` kbuild test robot
2018-09-18  6:38 ` [PATCH 06/19] vmw_balloon: change batch/single lock abstractions Nadav Amit
2018-09-18  6:38 ` [PATCH 07/19] vmw_balloon: treat all refused pages equally Nadav Amit
2018-09-18  6:38 ` [PATCH 08/19] vmw_balloon: refactor change size from vmballoon_work Nadav Amit
2018-09-18  8:09   ` kbuild test robot [this message]
2018-09-18 12:19   ` kbuild test robot
2018-09-18  6:38 ` [PATCH 09/19] vmw_balloon: simplify vmballoon_send_get_target() Nadav Amit
2018-09-18  6:38 ` [PATCH 10/19] vmw_balloon: stats rework Nadav Amit
2018-09-18  6:38 ` [PATCH 11/19] vmw_balloon: rework the inflate and deflate loops Nadav Amit
2018-09-18  9:55   ` kbuild test robot
2018-09-18 15:46   ` kbuild test robot
2018-09-18  6:38 ` [PATCH 12/19] vmw_balloon: general style cleanup Nadav Amit
2018-09-18  6:38 ` [PATCH 13/19] vmw_balloon: add reset stat Nadav Amit
2018-09-18  6:38 ` [PATCH 14/19] mm/balloon_compaction: suppress allocation warnings Nadav Amit
2018-09-18  6:38 ` [PATCH 15/19] mm/balloon_compaction: list interfaces Nadav Amit
2018-09-18  6:38 ` [PATCH 16/19] vmw_balloon: compaction support Nadav Amit
2018-09-18  6:38 ` [PATCH 17/19] vmw_balloon: support 64-bit memory limit Nadav Amit
2018-09-18  6:38 ` [PATCH 18/19] vmw_balloon: memory shrinker Nadav Amit
2018-09-18  6:38 ` [PATCH 19/19] vmw_balloon: split refused pages Nadav Amit
2018-09-18 12:27 ` [PATCH 00/19] vmw_balloon: compaction, shrinker, 64-bit, etc Greg Kroah-Hartman
2018-09-18 16:42   ` Nadav Amit

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=201809181612.E5Y7onI9%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namit@vmware.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

all inboxes | Powered by JetHome®