From: kbuild test robot <lkp@intel.com>
To: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: kbuild-all@01.org, steven.sistare@oracle.com,
daniel.m.jordan@oracle.com, akpm@linux-foundation.org,
mgorman@techsingularity.net, mhocko@suse.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
vbabka@suse.cz, bharata@linux.vnet.ibm.com
Subject: Re: [PATCH v2 2/2] mm, memory_hotplug: optimize memory hotplug
Date: Fri, 2 Feb 2018 12:48:45 +0800 [thread overview]
Message-ID: <201802021240.HXFRoJlS%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180131210300.22963-3-pasha.tatashin@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 7923 bytes --]
Hi Pavel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mmotm/master]
[also build test WARNING on next-20180201]
[cannot apply to v4.15]
[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/Pavel-Tatashin/mm-uninitialized-struct-page-poisoning-sanity-checking/20180202-105827
base: git://git.cmpxchg.org/linux-mmotm.git master
config: x86_64-randconfig-x019-201804 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
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/page_ref.h:7:0,
from include/linux/mm.h:26,
from mm/sparse.c:5:
mm/sparse.c: In function 'sparse_add_one_section':
include/linux/page-flags.h:159:29: warning: overflow in implicit constant conversion [-Woverflow]
#define PAGE_POISON_PATTERN ~0ul
^
>> mm/sparse.c:838:17: note: in expansion of macro 'PAGE_POISON_PATTERN'
memset(memmap, PAGE_POISON_PATTERN,
^~~~~~~~~~~~~~~~~~~
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
Cyclomatic Complexity 3 include/linux/log2.h:is_power_of_2
Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
Cyclomatic Complexity 3 include/linux/string.h:memset
Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
Cyclomatic Complexity 1 include/linux/nodemask.h:node_state
Cyclomatic Complexity 1 include/linux/memory_hotplug.h:pgdat_resize_lock
Cyclomatic Complexity 1 include/linux/memory_hotplug.h:pgdat_resize_unlock
Cyclomatic Complexity 1 include/linux/mmzone.h:pfn_to_section_nr
Cyclomatic Complexity 1 include/linux/mmzone.h:section_nr_to_pfn
Cyclomatic Complexity 3 include/linux/mmzone.h:__nr_to_section
Cyclomatic Complexity 1 include/linux/mmzone.h:__section_mem_map_addr
Cyclomatic Complexity 3 include/linux/mmzone.h:present_section
Cyclomatic Complexity 1 include/linux/mmzone.h:present_section_nr
Cyclomatic Complexity 3 include/linux/mmzone.h:valid_section
Cyclomatic Complexity 1 include/linux/mmzone.h:valid_section_nr
Cyclomatic Complexity 1 include/linux/mmzone.h:__pfn_to_section
Cyclomatic Complexity 2 include/linux/mmzone.h:pfn_present
Cyclomatic Complexity 1 arch/x86/include/asm/topology.h:numa_node_id
Cyclomatic Complexity 1 include/linux/topology.h:numa_mem_id
Cyclomatic Complexity 1 include/linux/mm.h:is_vmalloc_addr
Cyclomatic Complexity 1 include/linux/mm.h:page_to_section
Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
Cyclomatic Complexity 1 include/linux/slab.h:__kmalloc_node
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_node_trace
Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 5 include/linux/slab.h:kmalloc
Cyclomatic Complexity 5 include/linux/slab.h:kmalloc_node
Cyclomatic Complexity 1 include/linux/slab.h:kzalloc_node
Cyclomatic Complexity 1 include/linux/bootmem.h:alloc_remap
Cyclomatic Complexity 1 mm/sparse.c:set_section_nid
Cyclomatic Complexity 1 mm/sparse.c:sparse_encode_early_nid
Cyclomatic Complexity 1 mm/sparse.c:sparse_early_nid
Cyclomatic Complexity 4 mm/sparse.c:next_present_section_nr
Cyclomatic Complexity 1 mm/sparse.c:check_usemap_section_nr
Cyclomatic Complexity 6 mm/sparse.c:alloc_usemap_and_memmap
Cyclomatic Complexity 1 include/linux/bootmem.h:memblock_virt_alloc
Cyclomatic Complexity 1 include/linux/bootmem.h:memblock_virt_alloc_node
Cyclomatic Complexity 2 mm/sparse.c:sparse_index_alloc
Cyclomatic Complexity 3 mm/sparse.c:sparse_index_init
Cyclomatic Complexity 1 include/linux/bootmem.h:memblock_virt_alloc_node_nopanic
Cyclomatic Complexity 1 mm/sparse.c:sparse_early_usemaps_alloc_pgdat_section
Cyclomatic Complexity 2 mm/sparse.c:sparse_encode_mem_map
Cyclomatic Complexity 2 mm/sparse.c:sparse_init_one_section
Cyclomatic Complexity 1 include/linux/bootmem.h:memblock_free_early
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages
Cyclomatic Complexity 2 include/linux/gfp.h:__alloc_pages_node
Cyclomatic Complexity 2 include/linux/gfp.h:alloc_pages_node
Cyclomatic Complexity 70 mm/sparse.c:__kmalloc_section_memmap
Cyclomatic Complexity 1 mm/sparse.c:kmalloc_section_memmap
Cyclomatic Complexity 2 mm/sparse.c:__kfree_section_memmap
Cyclomatic Complexity 3 mm/sparse.c:get_section_nid
Cyclomatic Complexity 5 mm/sparse.c:__section_nr
Cyclomatic Complexity 2 mm/sparse.c:section_mark_present
Cyclomatic Complexity 7 mm/sparse.c:mminit_validate_memmodel_limits
Cyclomatic Complexity 4 mm/sparse.c:node_memmap_size_bytes
Cyclomatic Complexity 4 mm/sparse.c:memory_present
Cyclomatic Complexity 1 mm/sparse.c:sparse_decode_mem_map
Cyclomatic Complexity 1 mm/sparse.c:usemap_size
Cyclomatic Complexity 4 mm/sparse.c:sparse_early_usemaps_alloc_node
Cyclomatic Complexity 1 mm/sparse.c:__kmalloc_section_usemap
Cyclomatic Complexity 2 mm/sparse.c:sparse_mem_map_populate
Cyclomatic Complexity 10 mm/sparse.c:sparse_mem_maps_populate_node
Cyclomatic Complexity 1 mm/sparse.c:sparse_early_mem_maps_alloc_node
Cyclomatic Complexity 1 mm/sparse.c:vmemmap_populate_print_last
Cyclomatic Complexity 6 mm/sparse.c:sparse_init
Cyclomatic Complexity 4 mm/sparse.c:online_mem_sections
Cyclomatic Complexity 6 mm/sparse.c:sparse_add_one_section
vim +/PAGE_POISON_PATTERN +838 mm/sparse.c
793
794 /*
795 * returns the number of sections whose mem_maps were properly
796 * set. If this is <=0, then that means that the passed-in
797 * map was not consumed and must be freed.
798 */
799 int __meminit sparse_add_one_section(struct pglist_data *pgdat,
800 unsigned long start_pfn, struct vmem_altmap *altmap)
801 {
802 unsigned long section_nr = pfn_to_section_nr(start_pfn);
803 struct mem_section *ms;
804 struct page *memmap;
805 unsigned long *usemap;
806 unsigned long flags;
807 int ret;
808
809 /*
810 * no locking for this, because it does its own
811 * plus, it does a kmalloc
812 */
813 ret = sparse_index_init(section_nr, pgdat->node_id);
814 if (ret < 0 && ret != -EEXIST)
815 return ret;
816 memmap = kmalloc_section_memmap(section_nr, pgdat->node_id, altmap);
817 if (!memmap)
818 return -ENOMEM;
819 usemap = __kmalloc_section_usemap();
820 if (!usemap) {
821 __kfree_section_memmap(memmap, altmap);
822 return -ENOMEM;
823 }
824
825 pgdat_resize_lock(pgdat, &flags);
826
827 ms = __pfn_to_section(start_pfn);
828 if (ms->section_mem_map & SECTION_MARKED_PRESENT) {
829 ret = -EEXIST;
830 goto out;
831 }
832
833 #ifdef CONFIG_DEBUG_VM
834 /*
835 * poison uninitialized struct pages in order to catch invalid flags
836 * combinations.
837 */
> 838 memset(memmap, PAGE_POISON_PATTERN,
839 sizeof(struct page) * PAGES_PER_SECTION);
840 #endif
841
842 section_mark_present(ms);
843
844 ret = sparse_init_one_section(ms, section_nr, memmap, usemap);
845
846 out:
847 pgdat_resize_unlock(pgdat, &flags);
848 if (ret <= 0) {
849 kfree(usemap);
850 __kfree_section_memmap(memmap, altmap);
851 } else {
852 set_section_nid(section_nr, pgdat->node_id);
853 }
854 return ret;
855 }
856
---
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: 29871 bytes --]
prev parent reply other threads:[~2018-02-02 4:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 21:02 [PATCH v2 0/2] optimize memory hotplug Pavel Tatashin
2018-01-31 21:02 ` [PATCH v2 1/2] mm: uninitialized struct page poisoning sanity checking Pavel Tatashin
2018-02-02 4:12 ` kbuild test robot
2018-03-13 23:43 ` Sasha Levin
2018-03-14 0:38 ` Pavel Tatashin
2018-03-14 0:53 ` Sasha Levin
2018-03-14 1:02 ` Pavel Tatashin
2018-03-15 19:04 ` Pavel Tatashin
2018-03-15 20:43 ` Sasha Levin
2018-04-04 2:17 ` Pavel Tatashin
2018-04-05 13:49 ` Pavel Tatashin
2018-04-05 19:22 ` Sasha Levin
2018-04-06 12:45 ` Pavel Tatashin
2018-04-07 14:45 ` Pavel Tatashin
2018-01-31 21:03 ` [PATCH v2 2/2] mm, memory_hotplug: optimize memory hotplug Pavel Tatashin
2018-02-02 4:48 ` kbuild test robot [this message]
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=201802021240.HXFRoJlS%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=daniel.m.jordan@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=pasha.tatashin@oracle.com \
--cc=steven.sistare@oracle.com \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).