linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Pingfan Liu <kernelfans@gmail.com>
Cc: kbuild-all@01.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	Michal Hocko <mhocko@suse.com>,
	Bharata B Rao <bharata@linux.vnet.ibm.com>,
	Dan Williams <dan.j.williams@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH 2/3] drivers/base/memory: introduce a new state 'isolate' for memblock
Date: Wed, 19 Sep 2018 14:49:37 +0800	[thread overview]
Message-ID: <201809191406.Nxk5UGTQ%fengguang.wu@intel.com> (raw)
In-Reply-To: <1537327066-27852-3-git-send-email-kernelfans@gmail.com>

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

Hi Pingfan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.19-rc4 next-20180918]
[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/Pingfan-Liu/introduce-a-new-state-isolate-for-memblock-to-split-the-isolation-and-migration-steps/20180919-112650
config: x86_64-randconfig-s0-09191204 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/base/memory.o: In function `store_mem_state':
>> drivers/base/memory.c:385: undefined reference to `start_isolate_page_range'
>> drivers/base/memory.c:391: undefined reference to `undo_isolate_page_range'

vim +385 drivers/base/memory.c

   323	
   324	static ssize_t
   325	store_mem_state(struct device *dev,
   326			struct device_attribute *attr, const char *buf, size_t count)
   327	{
   328		struct memory_block *mem = to_memory_block(dev);
   329		int ret, online_type;
   330		int isolated = 0;
   331		unsigned long start_pfn;
   332		unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block;
   333	
   334		ret = lock_device_hotplug_sysfs();
   335		if (ret)
   336			return ret;
   337	
   338		if (sysfs_streq(buf, "online_kernel"))
   339			online_type = MMOP_ONLINE_KERNEL;
   340		else if (sysfs_streq(buf, "online_movable"))
   341			online_type = MMOP_ONLINE_MOVABLE;
   342		else if (sysfs_streq(buf, "online"))
   343			online_type = MMOP_ONLINE_KEEP;
   344		else if (sysfs_streq(buf, "offline"))
   345			online_type = MMOP_OFFLINE;
   346		else if (sysfs_streq(buf, "isolate")) {
   347			isolated = 1;
   348			goto memblock_isolated;
   349		} else if (sysfs_streq(buf, "unisolate")) {
   350			isolated = -1;
   351			goto memblock_isolated;
   352		} else {
   353			ret = -EINVAL;
   354			goto err;
   355		}
   356	
   357		/*
   358		 * Memory hotplug needs to hold mem_hotplug_begin() for probe to find
   359		 * the correct memory block to online before doing device_online(dev),
   360		 * which will take dev->mutex.  Take the lock early to prevent an
   361		 * inversion, memory_subsys_online() callbacks will be implemented by
   362		 * assuming it's already protected.
   363		 */
   364		mem_hotplug_begin();
   365	
   366		switch (online_type) {
   367		case MMOP_ONLINE_KERNEL:
   368		case MMOP_ONLINE_MOVABLE:
   369		case MMOP_ONLINE_KEEP:
   370			mem->online_type = online_type;
   371			ret = device_online(&mem->dev);
   372			break;
   373		case MMOP_OFFLINE:
   374			ret = device_offline(&mem->dev);
   375			break;
   376		default:
   377			ret = -EINVAL; /* should never happen */
   378		}
   379	
   380		mem_hotplug_done();
   381	err:
   382	memblock_isolated:
   383		if (isolated == 1 && mem->state == MEM_ONLINE) {
   384			start_pfn = section_nr_to_pfn(mem->start_section_nr);
 > 385			ret = start_isolate_page_range(start_pfn, start_pfn + nr_pages,
   386				MIGRATE_MOVABLE, true, true);
   387			if (!ret)
   388				mem->state = MEM_ISOLATED;
   389		} else if (isolated == -1 && mem->state == MEM_ISOLATED) {
   390			start_pfn = section_nr_to_pfn(mem->start_section_nr);
 > 391			ret = undo_isolate_page_range(start_pfn, start_pfn + nr_pages,
   392				MIGRATE_MOVABLE, true);
   393			if (!ret)
   394				mem->state = MEM_ONLINE;
   395		}
   396		unlock_device_hotplug();
   397	
   398		if (ret < 0)
   399			return ret;
   400		if (ret)
   401			return -EINVAL;
   402	
   403		return count;
   404	}
   405	

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

  reply	other threads:[~2018-09-19  6:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19  3:17 [PATCH 0/3] introduce a new state 'isolate' for memblock to split the isolation and migration steps Pingfan Liu
2018-09-19  3:17 ` [PATCH 1/3] mm/isolation: separate the isolation and migration ops in offline memblock Pingfan Liu
2018-09-19  3:17 ` [PATCH 2/3] drivers/base/memory: introduce a new state 'isolate' for memblock Pingfan Liu
2018-09-19  6:49   ` kbuild test robot [this message]
2018-09-19  3:17 ` [PATCH 3/3] drivers/base/node: create a partial offline hints under each node Pingfan Liu
2018-09-19  4:36   ` kbuild test robot

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=201809191406.Nxk5UGTQ%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kbuild-all@01.org \
    --cc=kernelfans@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=pasha.tatashin@oracle.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