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 3/3] drivers/base/node: create a partial offline hints under each node
Date: Wed, 19 Sep 2018 12:36:16 +0800 [thread overview]
Message-ID: <201809191208.c2G3whLl%fengguang.wu@intel.com> (raw)
In-Reply-To: <1537327066-27852-4-git-send-email-kernelfans@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4562 bytes --]
Hi Pingfan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING 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-x018-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 >>):
mm/memory_hotplug.c: In function 'do_migrate_range':
>> mm/memory_hotplug.c:1442:53: warning: passing argument 4 of 'migrate_pages' makes integer from pointer without a cast [-Wint-conversion]
ret = migrate_pages(&source, new_node_page, NULL, &nmask,
^
In file included from mm/memory_hotplug.c:27:0:
include/linux/migrate.h:68:12: note: expected 'long unsigned int' but argument is of type 'nodemask_t * {aka struct <anonymous> *}'
extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
^~~~~~~~~~~~~
vim +/migrate_pages +1442 mm/memory_hotplug.c
1356
1357 #define NR_OFFLINE_AT_ONCE_PAGES (256)
1358 static int
1359 do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
1360 {
1361 unsigned long pfn;
1362 struct page *page;
1363 int move_pages = NR_OFFLINE_AT_ONCE_PAGES;
1364 int not_managed = 0;
1365 int ret = 0;
1366 LIST_HEAD(source);
1367 int nid;
1368 nodemask_t nmask = node_states[N_MEMORY];
1369
1370 for (pfn = start_pfn; pfn < end_pfn && move_pages > 0; pfn++) {
1371 if (!pfn_valid(pfn))
1372 continue;
1373 page = pfn_to_page(pfn);
1374
1375 if (PageHuge(page)) {
1376 struct page *head = compound_head(page);
1377 pfn = page_to_pfn(head) + (1<<compound_order(head)) - 1;
1378 if (compound_order(head) > PFN_SECTION_SHIFT) {
1379 ret = -EBUSY;
1380 break;
1381 }
1382 if (isolate_huge_page(page, &source))
1383 move_pages -= 1 << compound_order(head);
1384 continue;
1385 } else if (PageTransHuge(page))
1386 pfn = page_to_pfn(compound_head(page))
1387 + hpage_nr_pages(page) - 1;
1388
1389 if (!get_page_unless_zero(page))
1390 continue;
1391 /*
1392 * We can skip free pages. And we can deal with pages on
1393 * LRU and non-lru movable pages.
1394 */
1395 if (PageLRU(page))
1396 ret = isolate_lru_page(page);
1397 else
1398 ret = isolate_movable_page(page, ISOLATE_UNEVICTABLE);
1399 if (!ret) { /* Success */
1400 put_page(page);
1401 list_add_tail(&page->lru, &source);
1402 move_pages--;
1403 if (!__PageMovable(page))
1404 inc_node_page_state(page, NR_ISOLATED_ANON +
1405 page_is_file_cache(page));
1406
1407 } else {
1408 #ifdef CONFIG_DEBUG_VM
1409 pr_alert("failed to isolate pfn %lx\n", pfn);
1410 dump_page(page, "isolation failed");
1411 #endif
1412 put_page(page);
1413 /* Because we don't have big zone->lock. we should
1414 check this again here. */
1415 if (page_count(page)) {
1416 not_managed++;
1417 ret = -EBUSY;
1418 break;
1419 }
1420 }
1421 }
1422 if (!list_empty(&source)) {
1423 if (not_managed) {
1424 putback_movable_pages(&source);
1425 goto out;
1426 }
1427
1428 page = list_entry(source.next, struct page, lru);
1429 nid = page_to_nid(page);
1430 if (!NODE_DATA(nid)->partial_offline) {
1431 /*
1432 * try to allocate from a different node but reuse this
1433 * node if there are no other online nodes to be used
1434 * (e.g. we are offlining a part of the only existing
1435 * node)
1436 */
1437 node_clear(nid, nmask);
1438 if (nodes_empty(nmask))
1439 node_set(nid, nmask);
1440 }
1441 /* Allocate a new page from the nearest neighbor node */
> 1442 ret = migrate_pages(&source, new_node_page, NULL, &nmask,
1443 MIGRATE_SYNC, MR_MEMORY_HOTPLUG);
1444 if (ret)
1445 putback_movable_pages(&source);
1446 }
1447 out:
1448 return ret;
1449 }
1450
---
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: 33239 bytes --]
prev parent reply other threads:[~2018-09-19 4:37 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
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 [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=201809191208.c2G3whLl%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