[mmotm:master 149/256] mm/migrate.c:1920:46: error: passing argument 2 of 'migrate_pages' from incompatible pointer type

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

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   1ceb98996d2504dd4e0bcb5f4cb9009a18cd8aaa
commit: c714f7da3636f838c8ed46c7c477525c2ea98a0f [149/256] mm, migrate: remove reason argument from new_page_t
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout c714f7da3636f838c8ed46c7c477525c2ea98a0f
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   mm/migrate.c: In function 'migrate_misplaced_page':
>> mm/migrate.c:1920:46: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
     nr_remaining = migrate_pages(&migratepages, alloc_misplaced_dst_page,
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/migrate.c:1364:5: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
    int migrate_pages(struct list_head *from, new_page_t get_new_page,
        ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/migrate_pages +1920 mm/migrate.c

de466bd6 Mel Gorman     2013-12-18  1885  
b32967ff Mel Gorman     2012-11-19  1886  /*
b32967ff Mel Gorman     2012-11-19  1887   * Attempt to migrate a misplaced page to the specified destination
b32967ff Mel Gorman     2012-11-19  1888   * node. Caller is expected to have an elevated reference count on
b32967ff Mel Gorman     2012-11-19  1889   * the page that will be dropped by this function before returning.
b32967ff Mel Gorman     2012-11-19  1890   */
1bc115d8 Mel Gorman     2013-10-07  1891  int migrate_misplaced_page(struct page *page, struct vm_area_struct *vma,
1bc115d8 Mel Gorman     2013-10-07  1892  			   int node)
b32967ff Mel Gorman     2012-11-19  1893  {
b32967ff Mel Gorman     2012-11-19  1894  	pg_data_t *pgdat = NODE_DATA(node);
340ef390 Hugh Dickins   2013-02-22  1895  	int isolated;
7039e1db Peter Zijlstra 2012-10-25  1896  	int nr_remaining;
b32967ff Mel Gorman     2012-11-19  1897  	LIST_HEAD(migratepages);
b32967ff Mel Gorman     2012-11-19  1898  
b32967ff Mel Gorman     2012-11-19  1899  	/*
1bc115d8 Mel Gorman     2013-10-07  1900  	 * Don't migrate file pages that are mapped in multiple processes
1bc115d8 Mel Gorman     2013-10-07  1901  	 * with execute permissions as they are probably shared libraries.
b32967ff Mel Gorman     2012-11-19  1902  	 */
1bc115d8 Mel Gorman     2013-10-07  1903  	if (page_mapcount(page) != 1 && page_is_file_cache(page) &&
1bc115d8 Mel Gorman     2013-10-07  1904  	    (vma->vm_flags & VM_EXEC))
b32967ff Mel Gorman     2012-11-19  1905  		goto out;
7039e1db Peter Zijlstra 2012-10-25  1906  
b32967ff Mel Gorman     2012-11-19  1907  	/*
b32967ff Mel Gorman     2012-11-19  1908  	 * Rate-limit the amount of data that is being migrated to a node.
b32967ff Mel Gorman     2012-11-19  1909  	 * Optimal placement is no good if the memory bus is saturated and
b32967ff Mel Gorman     2012-11-19  1910  	 * all the time is being spent migrating!
b32967ff Mel Gorman     2012-11-19  1911  	 */
340ef390 Hugh Dickins   2013-02-22  1912  	if (numamigrate_update_ratelimit(pgdat, 1))
b32967ff Mel Gorman     2012-11-19  1913  		goto out;
b32967ff Mel Gorman     2012-11-19  1914  
b32967ff Mel Gorman     2012-11-19  1915  	isolated = numamigrate_isolate_page(pgdat, page);
b32967ff Mel Gorman     2012-11-19  1916  	if (!isolated)
b32967ff Mel Gorman     2012-11-19  1917  		goto out;
b32967ff Mel Gorman     2012-11-19  1918  
b32967ff Mel Gorman     2012-11-19  1919  	list_add(&page->lru, &migratepages);
9c620e2b Hugh Dickins   2013-02-22 @1920  	nr_remaining = migrate_pages(&migratepages, alloc_misplaced_dst_page,
68711a74 David Rientjes 2014-06-04  1921  				     NULL, node, MIGRATE_ASYNC,
68711a74 David Rientjes 2014-06-04  1922  				     MR_NUMA_MISPLACED);
7039e1db Peter Zijlstra 2012-10-25  1923  	if (nr_remaining) {
59c82b70 Joonsoo Kim    2014-01-21  1924  		if (!list_empty(&migratepages)) {
59c82b70 Joonsoo Kim    2014-01-21  1925  			list_del(&page->lru);
599d0c95 Mel Gorman     2016-07-28  1926  			dec_node_page_state(page, NR_ISOLATED_ANON +
59c82b70 Joonsoo Kim    2014-01-21  1927  					page_is_file_cache(page));
59c82b70 Joonsoo Kim    2014-01-21  1928  			putback_lru_page(page);
59c82b70 Joonsoo Kim    2014-01-21  1929  		}
7039e1db Peter Zijlstra 2012-10-25  1930  		isolated = 0;
03c5a6e1 Mel Gorman     2012-11-02  1931  	} else
03c5a6e1 Mel Gorman     2012-11-02  1932  		count_vm_numa_event(NUMA_PAGE_MIGRATE);
7039e1db Peter Zijlstra 2012-10-25  1933  	BUG_ON(!list_empty(&migratepages));
7039e1db Peter Zijlstra 2012-10-25  1934  	return isolated;
340ef390 Hugh Dickins   2013-02-22  1935  
340ef390 Hugh Dickins   2013-02-22  1936  out:
340ef390 Hugh Dickins   2013-02-22  1937  	put_page(page);
340ef390 Hugh Dickins   2013-02-22  1938  	return 0;
7039e1db Peter Zijlstra 2012-10-25  1939  }
220018d3 Mel Gorman     2012-12-05  1940  #endif /* CONFIG_NUMA_BALANCING */
b32967ff Mel Gorman     2012-11-19  1941  

:::::: The code at line 1920 was first introduced by commit
:::::: 9c620e2bc5aa4256c102ada34e6c76204ed5898b mm: remove offlining arg to migrate_pages

:::::: TO: Hugh Dickins <hughd@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
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