linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Jia He <hejianet@gmail.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Mel Gorman <mgorman@suse.de>, Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	Daniel Jordan <daniel.m.jordan@oracle.com>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Gioh Kim <gi-oh.kim@profitbricks.com>,
	Steven Sistare <steven.sistare@oracle.com>,
	Daniel Vacek <neelx@redhat.com>,
	Eugeniu Rosca <erosca@de.adit-jv.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	James Morse <james.morse@arm.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Steve Capper <steve.capper@arm.com>,
	x86@kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Kemi Wang <kemi.wang@intel.com>, Petr Tesarik <ptesarik@suse.com>,
	YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Nikolay Borisov <nborisov@suse.com>, Jia He <hejianet@gmail.com>,
	Jia He <jia.he@hxt-semitech.com>
Subject: Re: [PATCH v2 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()
Date: Sun, 25 Mar 2018 18:48:22 +0800	[thread overview]
Message-ID: <201803251858.caumopw1%fengguang.wu@intel.com> (raw)
In-Reply-To: <1521894282-6454-6-git-send-email-hejianet@gmail.com>

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

Hi Jia,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mmotm/master]
[also build test ERROR on next-20180323]
[cannot apply to v4.16-rc6]
[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/Jia-He/optimize-memblock_next_valid_pfn-and-early_pfn_valid/20180325-175026
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: i386-randconfig-x013-201812 (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=i386 

All errors (new ones prefixed by >>):

   mm/page_alloc.c: In function 'memmap_init_zone':
>> mm/page_alloc.c:5499:4: error: continue statement not within a loop
       continue;
       ^~~~~~~~
>> mm/page_alloc.c:5501:4: error: break statement not within loop or switch
       break;
       ^~~~~
   mm/page_alloc.c:5520:5: error: continue statement not within a loop
        continue;
        ^~~~~~~~
   mm/page_alloc.c:5462:6: warning: unused variable 'idx' [-Wunused-variable]
     int idx = -1;
         ^~~
   mm/page_alloc.c: At top level:
>> mm/page_alloc.c:5551:1: error: expected identifier or '(' before '}' token
    }
    ^

vim +5499 mm/page_alloc.c

^1da177e4 Linus Torvalds 2005-04-16  5468  
22b31eec6 Hugh Dickins   2009-01-06  5469  	if (highest_memmap_pfn < end_pfn - 1)
22b31eec6 Hugh Dickins   2009-01-06  5470  		highest_memmap_pfn = end_pfn - 1;
22b31eec6 Hugh Dickins   2009-01-06  5471  
4b94ffdc4 Dan Williams   2016-01-15  5472  	/*
4b94ffdc4 Dan Williams   2016-01-15  5473  	 * Honor reservation requested by the driver for this ZONE_DEVICE
4b94ffdc4 Dan Williams   2016-01-15  5474  	 * memory
4b94ffdc4 Dan Williams   2016-01-15  5475  	 */
4b94ffdc4 Dan Williams   2016-01-15  5476  	if (altmap && start_pfn == altmap->base_pfn)
4b94ffdc4 Dan Williams   2016-01-15  5477  		start_pfn += altmap->reserve;
4b94ffdc4 Dan Williams   2016-01-15  5478  
cbe8dd4af Greg Ungerer   2006-01-12  5479  	for (pfn = start_pfn; pfn < end_pfn; pfn++) {
a2f3aa025 Dave Hansen    2007-01-10  5480  		/*
b72d0ffb5 Andrew Morton  2016-03-15  5481  		 * There can be holes in boot-time mem_map[]s handed to this
b72d0ffb5 Andrew Morton  2016-03-15  5482  		 * function.  They do not exist on hotplugged memory.
a2f3aa025 Dave Hansen    2007-01-10  5483  		 */
b72d0ffb5 Andrew Morton  2016-03-15  5484  		if (context != MEMMAP_EARLY)
b72d0ffb5 Andrew Morton  2016-03-15  5485  			goto not_early;
b72d0ffb5 Andrew Morton  2016-03-15  5486  
c0b211780 Jia He         2018-03-24  5487  #if (defined CONFIG_HAVE_MEMBLOCK) && (defined CONFIG_HAVE_ARCH_PFN_VALID)
94200be7f Jia He         2018-03-24  5488  		if (!early_pfn_valid(pfn, &idx)) {
c0b211780 Jia He         2018-03-24  5489  			/*
c0b211780 Jia He         2018-03-24  5490  			 * Skip to the pfn preceding the next valid one (or
c0b211780 Jia He         2018-03-24  5491  			 * end_pfn), such that we hit a valid pfn (or end_pfn)
c0b211780 Jia He         2018-03-24  5492  			 * on our next iteration of the loop.
c0b211780 Jia He         2018-03-24  5493  			 */
5ce6c7e68 Jia He         2018-03-24  5494  			pfn = memblock_next_valid_pfn(pfn, &idx) - 1;
c0b211780 Jia He         2018-03-24  5495  #endif
d41dee369 Andy Whitcroft 2005-06-23  5496  			continue;
c0b211780 Jia He         2018-03-24  5497  		}
751679573 Andy Whitcroft 2006-10-21  5498  		if (!early_pfn_in_nid(pfn, nid))
751679573 Andy Whitcroft 2006-10-21 @5499  			continue;
b72d0ffb5 Andrew Morton  2016-03-15  5500  		if (!update_defer_init(pgdat, pfn, end_pfn, &nr_initialised))
3a80a7fa7 Mel Gorman     2015-06-30 @5501  			break;
342332e6a Taku Izumi     2016-03-15  5502  
342332e6a Taku Izumi     2016-03-15  5503  #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
342332e6a Taku Izumi     2016-03-15  5504  		/*
b72d0ffb5 Andrew Morton  2016-03-15  5505  		 * Check given memblock attribute by firmware which can affect
b72d0ffb5 Andrew Morton  2016-03-15  5506  		 * kernel memory layout.  If zone==ZONE_MOVABLE but memory is
b72d0ffb5 Andrew Morton  2016-03-15  5507  		 * mirrored, it's an overlapped memmap init. skip it.
342332e6a Taku Izumi     2016-03-15  5508  		 */
342332e6a Taku Izumi     2016-03-15  5509  		if (mirrored_kernelcore && zone == ZONE_MOVABLE) {
b72d0ffb5 Andrew Morton  2016-03-15  5510  			if (!r || pfn >= memblock_region_memory_end_pfn(r)) {
342332e6a Taku Izumi     2016-03-15  5511  				for_each_memblock(memory, tmp)
342332e6a Taku Izumi     2016-03-15  5512  					if (pfn < memblock_region_memory_end_pfn(tmp))
342332e6a Taku Izumi     2016-03-15  5513  						break;
342332e6a Taku Izumi     2016-03-15  5514  				r = tmp;
342332e6a Taku Izumi     2016-03-15  5515  			}
342332e6a Taku Izumi     2016-03-15  5516  			if (pfn >= memblock_region_memory_base_pfn(r) &&
342332e6a Taku Izumi     2016-03-15  5517  			    memblock_is_mirror(r)) {
342332e6a Taku Izumi     2016-03-15  5518  				/* already initialized as NORMAL */
342332e6a Taku Izumi     2016-03-15  5519  				pfn = memblock_region_memory_end_pfn(r);
342332e6a Taku Izumi     2016-03-15 @5520  				continue;
342332e6a Taku Izumi     2016-03-15  5521  			}
342332e6a Taku Izumi     2016-03-15  5522  		}
342332e6a Taku Izumi     2016-03-15  5523  #endif
ac5d2539b Mel Gorman     2015-06-30  5524  
b72d0ffb5 Andrew Morton  2016-03-15  5525  not_early:
d08f92e7d Pavel Tatashin 2018-03-23  5526  		page = pfn_to_page(pfn);
d08f92e7d Pavel Tatashin 2018-03-23  5527  		__init_single_page(page, pfn, zone, nid);
d08f92e7d Pavel Tatashin 2018-03-23  5528  		if (context == MEMMAP_HOTPLUG)
d08f92e7d Pavel Tatashin 2018-03-23  5529  			SetPageReserved(page);
d08f92e7d Pavel Tatashin 2018-03-23  5530  
ac5d2539b Mel Gorman     2015-06-30  5531  		/*
ac5d2539b Mel Gorman     2015-06-30  5532  		 * Mark the block movable so that blocks are reserved for
ac5d2539b Mel Gorman     2015-06-30  5533  		 * movable at startup. This will force kernel allocations
ac5d2539b Mel Gorman     2015-06-30  5534  		 * to reserve their blocks rather than leaking throughout
ac5d2539b Mel Gorman     2015-06-30  5535  		 * the address space during boot when many long-lived
974a786e6 Mel Gorman     2015-11-06  5536  		 * kernel allocations are made.
ac5d2539b Mel Gorman     2015-06-30  5537  		 *
ac5d2539b Mel Gorman     2015-06-30  5538  		 * bitmap is created for zone's valid pfn range. but memmap
ac5d2539b Mel Gorman     2015-06-30  5539  		 * can be created for invalid pages (for alignment)
ac5d2539b Mel Gorman     2015-06-30  5540  		 * check here not to call set_pageblock_migratetype() against
ac5d2539b Mel Gorman     2015-06-30  5541  		 * pfn out of zone.
9bb5a391f Michal Hocko   2018-01-31  5542  		 *
9bb5a391f Michal Hocko   2018-01-31  5543  		 * Please note that MEMMAP_HOTPLUG path doesn't clear memmap
9bb5a391f Michal Hocko   2018-01-31  5544  		 * because this is done early in sparse_add_one_section
ac5d2539b Mel Gorman     2015-06-30  5545  		 */
ac5d2539b Mel Gorman     2015-06-30  5546  		if (!(pfn & (pageblock_nr_pages - 1))) {
ac5d2539b Mel Gorman     2015-06-30  5547  			set_pageblock_migratetype(page, MIGRATE_MOVABLE);
9b6e63cbf Michal Hocko   2017-10-03  5548  			cond_resched();
^1da177e4 Linus Torvalds 2005-04-16  5549  		}
^1da177e4 Linus Torvalds 2005-04-16  5550  	}
ac5d2539b Mel Gorman     2015-06-30 @5551  }
^1da177e4 Linus Torvalds 2005-04-16  5552  

:::::: The code at line 5499 was first introduced by commit
:::::: 7516795739bd53175629b90fab0ad488d7a6a9f7 [PATCH] Reintroduce NODES_SPAN_OTHER_NODES for powerpc

:::::: TO: Andy Whitcroft <apw@shadowen.org>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

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

      reply	other threads:[~2018-03-25 10:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24 12:24 [PATCH v2 0/5] optimize memblock_next_valid_pfn() and early_pfn_valid() Jia He
2018-03-24 12:24 ` [PATCH v2 1/5] mm: page_alloc: remain memblock_next_valid_pfn() when CONFIG_HAVE_ARCH_PFN_VALID is enable Jia He
2018-03-27 16:52   ` Daniel Vacek
2018-03-28  1:49     ` Jia He
2018-03-28  9:26     ` Jia He
2018-03-28 10:42       ` Daniel Vacek
2018-03-28  9:13   ` Wei Yang
2018-03-24 12:24 ` [PATCH v2 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn() Jia He
2018-03-24 12:24 ` [PATCH v2 3/5] mm/memblock: introduce memblock_search_pfn_regions() Jia He
2018-03-24 12:24 ` [PATCH v2 4/5] arm64: introduce pfn_valid_region() Jia He
2018-03-25 14:16   ` kbuild test robot
2018-03-24 12:24 ` [PATCH v2 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid() Jia He
2018-03-25 10: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=201803251858.caumopw1%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.m.jordan@oracle.com \
    --cc=erosca@de.adit-jv.com \
    --cc=gi-oh.kim@profitbricks.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hejianet@gmail.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=jia.he@hxt-semitech.com \
    --cc=kbuild-all@01.org \
    --cc=kemi.wang@intel.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=nborisov@suse.com \
    --cc=neelx@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=pombredanne@nexb.com \
    --cc=ptesarik@suse.com \
    --cc=steve.capper@arm.com \
    --cc=steven.sistare@oracle.com \
    --cc=takahiro.akashi@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    --cc=yasu.isimatu@gmail.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;
as well as URLs for NNTP newsgroup(s).