Re: [PATCH 05/19] vmw_balloon: remove sleeping allocations

From: kbuild test robot
Date: Tue Sep 18 2018 - 06:04:25 EST


Hi Nadav,

I love your patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR 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-x015-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 error/warnings (new ones prefixed by >>):

Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 1 include/linux/list.h:__list_del
Cyclomatic Complexity 2 arch/x86/include/asm/page_64.h:__phys_addr_nodebug
Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
Cyclomatic Complexity 1 arch/x86/include/asm/topology.h:numa_node_id
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:virt_to_phys
Cyclomatic Complexity 1 include/linux/topology.h:numa_mem_id
Cyclomatic Complexity 1 include/linux/mm.h:lowmem_page_address
Cyclomatic Complexity 3 include/linux/vmw_vmci_defs.h:vmci_handle_is_equal
Cyclomatic Complexity 1 include/linux/vmw_vmci_defs.h:vmci_handle_is_invalid
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_cmd
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_send_guest_id
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_page_size
Cyclomatic Complexity 4 drivers/misc/vmw_balloon.c:vmballoon_send_lock_page
Cyclomatic Complexity 5 drivers/misc/vmw_balloon.c:vmballoon_send_batched_lock
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_add_page
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_add_batched_page
Cyclomatic Complexity 2 include/linux/workqueue.h:to_delayed_work
Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
Cyclomatic Complexity 8 drivers/misc/vmw_balloon.c:__vmballoon_cmd
Cyclomatic Complexity 4 drivers/misc/vmw_balloon.c:vmballoon_send_start
Cyclomatic Complexity 2 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_free_page
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_unlock_page
Cyclomatic Complexity 5 drivers/misc/vmw_balloon.c:vmballoon_lock_page
Cyclomatic Complexity 4 drivers/misc/vmw_balloon.c:vmballoon_unlock_batched_page
Cyclomatic Complexity 9 drivers/misc/vmw_balloon.c:vmballoon_lock_batched_page
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_vmci_cleanup
Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
Cyclomatic Complexity 1 include/linux/list.h:list_del
Cyclomatic Complexity 6 drivers/misc/vmw_balloon.c:vmballoon_pop
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages_node
Cyclomatic Complexity 2 include/linux/gfp.h:alloc_pages_node
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_init_batching
Cyclomatic Complexity 4 drivers/misc/vmw_balloon.c:vmballoon_vmci_init
Cyclomatic Complexity 7 drivers/misc/vmw_balloon.c:vmballoon_reset
Cyclomatic Complexity 1 include/linux/workqueue.h:mod_delayed_work
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_doorbell
Cyclomatic Complexity 3 drivers/misc/vmw_balloon.c:vmballoon_send_get_target
Cyclomatic Complexity 3 drivers/misc/vmw_balloon.c:vmballoon_alloc_page
Cyclomatic Complexity 5 drivers/misc/vmw_balloon.c:vmballoon_release_refused_pages
Cyclomatic Complexity 10 drivers/misc/vmw_balloon.c:vmballoon_inflate
Cyclomatic Complexity 13 drivers/misc/vmw_balloon.c:vmballoon_deflate
Cyclomatic Complexity 2 drivers/misc/vmw_balloon.c:vmballoon_debugfs_init
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_debug_open
Cyclomatic Complexity 4 drivers/misc/vmw_balloon.c:vmballoon_debug_show
Cyclomatic Complexity 1 include/linux/workqueue.h:queue_delayed_work
Cyclomatic Complexity 4 drivers/misc/vmw_balloon.c:vmballoon_init
Cyclomatic Complexity 8 drivers/misc/vmw_balloon.c:vmballoon_work
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_debugfs_exit
Cyclomatic Complexity 1 drivers/misc/vmw_balloon.c:vmballoon_exit
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:735:8,
inlined from 'vmballoon_work' at drivers/misc/vmw_balloon.c:964:4:
>> include/linux/compiler.h:358:38: error: call to '__compiletime_assert_446' 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:446:49: note: in expansion of macro 'HPAGE_PMD_ORDER'
return alloc_pages(VMW_HUGE_PAGE_ALLOC_FLAGS, HPAGE_PMD_ORDER);
^~~~~~~~~~~~~~~
--
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 1 include/linux/list.h:__list_del
Cyclomatic Complexity 2 arch/x86/include/asm/page_64.h:__phys_addr_nodebug
Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
Cyclomatic Complexity 1 arch/x86/include/asm/topology.h:numa_node_id
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:virt_to_phys
Cyclomatic Complexity 1 include/linux/topology.h:numa_mem_id
Cyclomatic Complexity 1 include/linux/mm.h:lowmem_page_address
Cyclomatic Complexity 3 include/linux/vmw_vmci_defs.h:vmci_handle_is_equal
Cyclomatic Complexity 1 include/linux/vmw_vmci_defs.h:vmci_handle_is_invalid
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_cmd
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_send_guest_id
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_page_size
Cyclomatic Complexity 4 drivers//misc/vmw_balloon.c:vmballoon_send_lock_page
Cyclomatic Complexity 5 drivers//misc/vmw_balloon.c:vmballoon_send_batched_lock
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_add_page
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_add_batched_page
Cyclomatic Complexity 2 include/linux/workqueue.h:to_delayed_work
Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
Cyclomatic Complexity 8 drivers//misc/vmw_balloon.c:__vmballoon_cmd
Cyclomatic Complexity 4 drivers//misc/vmw_balloon.c:vmballoon_send_start
Cyclomatic Complexity 2 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_free_page
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_unlock_page
Cyclomatic Complexity 5 drivers//misc/vmw_balloon.c:vmballoon_lock_page
Cyclomatic Complexity 4 drivers//misc/vmw_balloon.c:vmballoon_unlock_batched_page
Cyclomatic Complexity 9 drivers//misc/vmw_balloon.c:vmballoon_lock_batched_page
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_vmci_cleanup
Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
Cyclomatic Complexity 1 include/linux/list.h:list_del
Cyclomatic Complexity 6 drivers//misc/vmw_balloon.c:vmballoon_pop
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages_node
Cyclomatic Complexity 2 include/linux/gfp.h:alloc_pages_node
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_init_batching
Cyclomatic Complexity 4 drivers//misc/vmw_balloon.c:vmballoon_vmci_init
Cyclomatic Complexity 7 drivers//misc/vmw_balloon.c:vmballoon_reset
Cyclomatic Complexity 1 include/linux/workqueue.h:mod_delayed_work
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_doorbell
Cyclomatic Complexity 3 drivers//misc/vmw_balloon.c:vmballoon_send_get_target
Cyclomatic Complexity 3 drivers//misc/vmw_balloon.c:vmballoon_alloc_page
Cyclomatic Complexity 5 drivers//misc/vmw_balloon.c:vmballoon_release_refused_pages
Cyclomatic Complexity 10 drivers//misc/vmw_balloon.c:vmballoon_inflate
Cyclomatic Complexity 13 drivers//misc/vmw_balloon.c:vmballoon_deflate
Cyclomatic Complexity 2 drivers//misc/vmw_balloon.c:vmballoon_debugfs_init
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_debug_open
Cyclomatic Complexity 4 drivers//misc/vmw_balloon.c:vmballoon_debug_show
Cyclomatic Complexity 1 include/linux/workqueue.h:queue_delayed_work
Cyclomatic Complexity 4 drivers//misc/vmw_balloon.c:vmballoon_init
Cyclomatic Complexity 8 drivers//misc/vmw_balloon.c:vmballoon_work
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_debugfs_exit
Cyclomatic Complexity 1 drivers//misc/vmw_balloon.c:vmballoon_exit
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:735:8,
inlined from 'vmballoon_work' at drivers//misc/vmw_balloon.c:964:4:
>> include/linux/compiler.h:358:38: error: call to '__compiletime_assert_446' 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:446:49: note: in expansion of macro 'HPAGE_PMD_ORDER'
return alloc_pages(VMW_HUGE_PAGE_ALLOC_FLAGS, HPAGE_PMD_ORDER);
^~~~~~~~~~~~~~~

vim +/HPAGE_PMD_ORDER +446 drivers/misc/vmw_balloon.c

442
443 static struct page *vmballoon_alloc_page(bool is_2m_page)
444 {
445 if (is_2m_page)
> 446 return alloc_pages(VMW_HUGE_PAGE_ALLOC_FLAGS, HPAGE_PMD_ORDER);
447
448 return alloc_page(VMW_PAGE_ALLOC_FLAGS);
449 }
450

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

Attachment: .config.gz
Description: application/gzip