Re: [PATCH 3/6] mm/migrate: Add copy_pages_mthread function

From: kbuild test robot
Date: Fri Feb 17 2017 - 07:28:30 EST


Hi Zi,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.10-rc8 next-20170216]
[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/Anshuman-Khandual/Enable-parallel-page-migration/20170217-200523
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

mm/copy_pages_mthread.c: In function 'copy_pages_mthread':
>> mm/copy_pages_mthread.c:49:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
cpumask = cpumask_of_node(node);
^

vim +/const +49 mm/copy_pages_mthread.c

33 static void copythread(struct work_struct *work)
34 {
35 struct copy_info *info = (struct copy_info *) work;
36
37 copy_pages(info->to, info->from, info->chunk_size);
38 }
39
40 int copy_pages_mthread(struct page *to, struct page *from, int nr_pages)
41 {
42 struct cpumask *cpumask;
43 struct copy_info *work_items;
44 char *vto, *vfrom;
45 unsigned long i, cthreads, cpu, node, chunk_size;
46 int cpu_id_list[32] = {0};
47
48 node = page_to_nid(to);
> 49 cpumask = cpumask_of_node(node);
50 cthreads = nr_copythreads;
51 cthreads = min_t(unsigned int, cthreads, cpumask_weight(cpumask));
52 cthreads = (cthreads / 2) * 2;
53 work_items = kcalloc(cthreads, sizeof(struct copy_info), GFP_KERNEL);
54 if (!work_items)
55 return -ENOMEM;
56
57 i = 0;

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

Attachment: .config.gz
Description: application/gzip