tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 5c90c8c1e78b11cba596b4cf0756220759f4ebae commit: 581a69b81673ae3cecd41af71338af42855964e2 [13866/30000] mm: support periodical memory reclaim config: x86_64-randconfig-r132-20240409 (https://download.01.org/0day-ci/archive/20240409/202404092240.lrAGVAyn-lkp@i...) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240409/202404092240.lrAGVAyn-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202404092240.lrAGVAyn-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
mm/page_cache_limit.c:39:50: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
mm/page_cache_limit.c:39:50: sparse: expected void * mm/page_cache_limit.c:39:50: sparse: got void [noderef] __user *buffer mm/page_cache_limit.c:55:50: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@ mm/page_cache_limit.c:55:50: sparse: expected void * mm/page_cache_limit.c:55:50: sparse: got void [noderef] __user *buffer
mm/page_cache_limit.c:73:35: sparse: sparse: incorrect type in initializer (incompatible argument 3 (different address spaces)) @@ expected int ( [usertype] *proc_handler )( ... ) @@ got int ( * )( ... ) @@
mm/page_cache_limit.c:73:35: sparse: expected int ( [usertype] *proc_handler )( ... ) mm/page_cache_limit.c:73:35: sparse: got int ( * )( ... ) mm/page_cache_limit.c:91:35: sparse: sparse: incorrect type in initializer (incompatible argument 3 (different address spaces)) @@ expected int ( [usertype] *proc_handler )( ... ) @@ got int ( * )( ... ) @@ mm/page_cache_limit.c:91:35: sparse: expected int ( [usertype] *proc_handler )( ... ) mm/page_cache_limit.c:91:35: sparse: got int ( * )( ... )
vim +39 mm/page_cache_limit.c
33 34 static int cache_reclaim_enable_handler(struct ctl_table *table, int write, 35 void __user *buffer, size_t *length, loff_t *ppos) 36 { 37 int ret; 38
39 ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
40 if (ret || !write) 41 return ret; 42 43 if (should_periodical_reclaim()) 44 schedule_delayed_work(&shepherd, round_jiffies_relative( 45 (unsigned long)vm_cache_reclaim_s * HZ)); 46 47 return 0; 48 } 49 50 static int cache_reclaim_sysctl_handler(struct ctl_table *table, int write, 51 void __user *buffer, size_t *length, loff_t *ppos) 52 { 53 int ret; 54 55 ret = proc_dointvec_minmax(table, write, buffer, length, ppos); 56 if (ret || !write) 57 return ret; 58 59 if (should_periodical_reclaim()) 60 mod_delayed_work(system_unbound_wq, &shepherd, 61 round_jiffies_relative( 62 (unsigned long)vm_cache_reclaim_s * HZ)); 63 64 return ret; 65 } 66 67 static struct ctl_table ctl_table[] = { 68 { 69 .procname = "cache_reclaim_s", 70 .data = &vm_cache_reclaim_s, 71 .maxlen = sizeof(vm_cache_reclaim_s), 72 .mode = 0644,
73 .proc_handler = cache_reclaim_sysctl_handler,
74 .extra1 = SYSCTL_ZERO, 75 .extra2 = &vm_cache_reclaim_s_max, 76 }, 77 { 78 .procname = "cache_reclaim_weight", 79 .data = &vm_cache_reclaim_weight, 80 .maxlen = sizeof(vm_cache_reclaim_weight), 81 .mode = 0644, 82 .proc_handler = proc_dointvec_minmax, 83 .extra1 = SYSCTL_ONE, 84 .extra2 = &vm_cache_reclaim_weight_max, 85 }, 86 { 87 .procname = "cache_reclaim_enable", 88 .data = &vm_cache_reclaim_enable, 89 .maxlen = sizeof(vm_cache_reclaim_enable), 90 .mode = 0644, 91 .proc_handler = cache_reclaim_enable_handler, 92 .extra1 = SYSCTL_ZERO, 93 .extra2 = SYSCTL_ONE, 94 }, 95 {} 96 }; 97