tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 1f45efe94d25460dffb96150477fac13369869da commit: 83ed4b5ab67eae3422e38fea7a92b58b8bd7178d [8049/8666] mm: initialize pages on demand during boot config: x86_64-randconfig-s4-03171437 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 83ed4b5ab67eae3422e38fea7a92b58b8bd7178d # save the attached .config to linux build tree make ARCH=x86_64 Note: the linux-next/master HEAD 1f45efe94d25460dffb96150477fac13369869da builds fine. It may have been fixed somewhere. All errors (new ones prefixed by >>): mm/page_alloc.c: In function 'deferred_grow_zone': >> mm/page_alloc.c:1616:2: error: implicit declaration of function 'pgdat_resize_lock_irq'; did you mean 'pgdat_resize_lock'? [-Werror=implicit-function-declaration] pgdat_resize_lock_irq(pgdat, &flags); ^~~~~~~~~~~~~~~~~~~~~ pgdat_resize_lock >> mm/page_alloc.c:1625:3: error: implicit declaration of function 'pgdat_resize_unlock_irq'; did you mean 'pgdat_resize_unlock'? [-Werror=implicit-function-declaration] pgdat_resize_unlock_irq(pgdat, &flags); ^~~~~~~~~~~~~~~~~~~~~~~ pgdat_resize_unlock cc1: some warnings being treated as errors vim +1616 mm/page_alloc.c 1583 1584 /* 1585 * If this zone has deferred pages, try to grow it by initializing enough 1586 * deferred pages to satisfy the allocation specified by order, rounded up to 1587 * the nearest PAGES_PER_SECTION boundary. So we're adding memory in increments 1588 * of SECTION_SIZE bytes by initializing struct pages in increments of 1589 * PAGES_PER_SECTION * sizeof(struct page) bytes. 1590 * 1591 * Return true when zone was grown, otherwise return false. We return true even 1592 * when we grow less than requested, let the caller decide if there are enough 1593 * pages to satisfy allocation. 1594 * 1595 * Note: We use noinline because this function is needed only during boot, and 1596 * it is called from a __ref function _deferred_grow_zone. This way we are 1597 * making sure that it is not inlined into permanent text section. 1598 */ 1599 static noinline bool __init 1600 deferred_grow_zone(struct zone *zone, unsigned int order) 1601 { 1602 int zid = zone_idx(zone); 1603 int nid = zone_to_nid(zone); 1604 pg_data_t *pgdat = NODE_DATA(nid); 1605 unsigned long nr_pages_needed = ALIGN(1 << order, PAGES_PER_SECTION); 1606 unsigned long nr_pages = 0; 1607 unsigned long first_init_pfn, spfn, epfn, t, flags; 1608 unsigned long first_deferred_pfn = pgdat->first_deferred_pfn; 1609 phys_addr_t spa, epa; 1610 u64 i; 1611 1612 /* Only the last zone may have deferred pages */ 1613 if (zone_end_pfn(zone) != pgdat_end_pfn(pgdat)) 1614 return false; 1615 > 1616 pgdat_resize_lock_irq(pgdat, &flags); 1617 1618 /* 1619 * If deferred pages have been initialized while we were waiting for 1620 * lock return true, as zone was grown. The caller will try again this 1621 * zone. We won't return to this function again, since caller also has 1622 * this static branch. 1623 */ 1624 if (!static_branch_unlikely(&deferred_pages)) { > 1625 pgdat_resize_unlock_irq(pgdat, &flags); 1626 return true; 1627 } 1628 1629 /* 1630 * If someone grew this zone while we were waiting for spinlock, return 1631 * true, as there might be enough pages already. 1632 */ 1633 if (first_deferred_pfn != pgdat->first_deferred_pfn) { 1634 pgdat_resize_unlock_irq(pgdat, &flags); 1635 return true; 1636 } 1637 1638 first_init_pfn = max(zone->zone_start_pfn, first_deferred_pfn); 1639 1640 if (first_init_pfn >= pgdat_end_pfn(pgdat)) { 1641 pgdat_resize_unlock_irq(pgdat, &flags); 1642 return false; 1643 } 1644 1645 for_each_free_mem_range(i, nid, MEMBLOCK_NONE, &spa, &epa, NULL) { 1646 spfn = max_t(unsigned long, first_init_pfn, PFN_UP(spa)); 1647 epfn = min_t(unsigned long, zone_end_pfn(zone), PFN_DOWN(epa)); 1648 1649 while (spfn < epfn && nr_pages < nr_pages_needed) { 1650 t = ALIGN(spfn + PAGES_PER_SECTION, PAGES_PER_SECTION); 1651 first_deferred_pfn = min(t, epfn); 1652 nr_pages += deferred_init_pages(nid, zid, spfn, 1653 first_deferred_pfn); 1654 spfn = first_deferred_pfn; 1655 } 1656 1657 if (nr_pages >= nr_pages_needed) 1658 break; 1659 } 1660 1661 for_each_free_mem_range(i, nid, MEMBLOCK_NONE, &spa, &epa, NULL) { 1662 spfn = max_t(unsigned long, first_init_pfn, PFN_UP(spa)); 1663 epfn = min_t(unsigned long, first_deferred_pfn, PFN_DOWN(epa)); 1664 deferred_free_pages(nid, zid, spfn, epfn); 1665 1666 if (first_deferred_pfn == epfn) 1667 break; 1668 } 1669 pgdat->first_deferred_pfn = first_deferred_pfn; 1670 pgdat_resize_unlock_irq(pgdat, &flags); 1671 1672 return nr_pages > 0; 1673 } 1674 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip