Re: [PATCH 3/3] mm: Allow find_get_page to be used for large pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matthew,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc7 next-20190904]
[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/Matthew-Wilcox/mm-Add-__page_cache_alloc_order/20190906-034745
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   mm/filemap.c: In function '__add_to_page_cache_locked':
   mm/filemap.c:863:8: error: implicit declaration of function 'compound_nr'; did you mean 'compound_order'? [-Werror=implicit-function-declaration]
      nr = compound_nr(page);
           ^~~~~~~~~~~
           compound_order
   mm/filemap.c: In function '__find_get_page':
>> mm/filemap.c:1637:9: error: implicit declaration of function 'find_subpage'; did you mean 'find_get_page'? [-Werror=implicit-function-declaration]
     page = find_subpage(page, offset);
            ^~~~~~~~~~~~
            find_get_page
>> mm/filemap.c:1637:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     page = find_subpage(page, offset);
          ^
   cc1: some warnings being treated as errors

vim +1637 mm/filemap.c

  1583	
  1584	/**
  1585	 * __find_get_page - Find and get a page cache entry.
  1586	 * @mapping: The address_space to search.
  1587	 * @offset: The page cache index.
  1588	 * @order: The minimum order of the entry to return.
  1589	 *
  1590	 * Looks up the page cache entries at @mapping between @offset and
  1591	 * @offset + 2^@order.  If there is a page cache page, it is returned with
  1592	 * an increased refcount unless it is smaller than @order.
  1593	 *
  1594	 * If the slot holds a shadow entry of a previously evicted page, or a
  1595	 * swap entry from shmem/tmpfs, it is returned.
  1596	 *
  1597	 * Return: the found page, a value indicating a conflicting page or %NULL if
  1598	 * there are no pages in this range.
  1599	 */
  1600	static struct page *__find_get_page(struct address_space *mapping,
  1601			unsigned long offset, unsigned int order)
  1602	{
  1603		XA_STATE(xas, &mapping->i_pages, offset);
  1604		struct page *page;
  1605	
  1606		rcu_read_lock();
  1607	repeat:
  1608		xas_reset(&xas);
  1609		page = xas_find(&xas, offset | ((1UL << order) - 1));
  1610		if (xas_retry(&xas, page))
  1611			goto repeat;
  1612		/*
  1613		 * A shadow entry of a recently evicted page, or a swap entry from
  1614		 * shmem/tmpfs.  Skip it; keep looking for pages.
  1615		 */
  1616		if (xa_is_value(page))
  1617			goto repeat;
  1618		if (!page)
  1619			goto out;
  1620		if (compound_order(page) < order) {
  1621			page = XA_RETRY_ENTRY;
  1622			goto out;
  1623		}
  1624	
  1625		if (!page_cache_get_speculative(page))
  1626			goto repeat;
  1627	
  1628		/*
  1629		 * Has the page moved or been split?
  1630		 * This is part of the lockless pagecache protocol. See
  1631		 * include/linux/pagemap.h for details.
  1632		 */
  1633		if (unlikely(page != xas_reload(&xas))) {
  1634			put_page(page);
  1635			goto repeat;
  1636		}
> 1637		page = find_subpage(page, offset);
  1638	out:
  1639		rcu_read_unlock();
  1640	
  1641		return page;
  1642	}
  1643	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux