tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 8f7c77eb69ee331fb66fad8eec5ca81b8843eaf3 commit: 7d1031b36ebd6c273d9aad316fd9e3e2daa01a85 [1835/7374] mm: support pagecache limit config: x86_64-randconfig-123-20240412 (https://download.01.org/0day-ci/archive/20240412/202404120434.Ta6yim1A-lkp@i...) compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240412/202404120434.Ta6yim1A-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/202404120434.Ta6yim1A-lkp@intel.com/
sparse warnings: (new ones prefixed by >>) mm/page_cache_limit.c:61:5: sparse: sparse: symbol 'cache_reclaim_enable_handler' was not declared. Should it be static? mm/page_cache_limit.c:77:5: sparse: sparse: symbol 'cache_reclaim_sysctl_handler' was not declared. Should it be static? mm/page_cache_limit.c:103:52: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@ mm/page_cache_limit.c:103:52: sparse: expected void * mm/page_cache_limit.c:103:52: sparse: got void [noderef] __user *buffer
mm/page_cache_limit.c:94:5: sparse: sparse: symbol 'cache_limit_mbytes_sysctl_handler' was not declared. Should it be static?
mm/page_cache_limit.c:187: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:187:35: sparse: expected int ( [usertype] *proc_handler )( ... ) mm/page_cache_limit.c:187:35: sparse: got int ( * )( ... )
vim +/cache_limit_mbytes_sysctl_handler +94 mm/page_cache_limit.c
93
94 int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write,
95 void __user *buffer, size_t *length, loff_t *ppos) 96 { 97 int ret; 98 unsigned long vm_cache_limit_mbytes_max; 99 unsigned long origin_mbytes = vm_cache_limit_mbytes; 100 int nr_retries = MAX_RECLAIM_RETRIES; 101 102 vm_cache_limit_mbytes_max = totalram_pages() >> (20 - PAGE_SHIFT); 103 ret = proc_doulongvec_minmax(table, write, buffer, length, ppos); 104 if (ret || !write) 105 return ret; 106 107 if (vm_cache_limit_mbytes > vm_cache_limit_mbytes_max) { 108 vm_cache_limit_mbytes = origin_mbytes; 109 return -EINVAL; 110 } 111 112 if (write) { 113 while (should_reclaim_page_cache() && page_cache_over_limit() && 114 nr_retries--) { 115 if (signal_pending(current)) 116 return -EINTR; 117 118 shrink_memory(node_reclaim_num(), false); 119 } 120 } 121 122 return 0; 123 } 124