CC: [email protected] TO: [email protected] tree: https://android.googlesource.com/kernel/common android13-5.15 head: 01c03ceb176604d2a31611c17585c2f9b61b9abf commit: 37b2d597bb542ea753f4f11604ce2c35868271ba [2/3] ANDROID: mm: add cma pcp list :::::: branch date: 2 weeks ago :::::: commit date: 2 weeks ago config: i386-randconfig-c001-20211118 (attached as .config) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git remote add android-common https://android.googlesource.com/kernel/common git fetch --no-tags android-common android13-5.15 git checkout 37b2d597bb542ea753f4f11604ce2c35868271ba # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) __cmp(unique_x, unique_y, op); }) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~~ mm/page_alloc.c:1458:10: note: '?' condition is false count = min(pcp->count, count); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ mm/page_alloc.c:1459:9: note: Assuming 'count' is <= 0 while (count > 0) { ^~~~~~~~~ mm/page_alloc.c:1459:2: note: Loop condition is false. Execution continues on line 1513 while (count > 0) { ^ mm/page_alloc.c:1526:2: note: Left side of '&&' is false list_for_each_entry_safe(page, tmp, &head, lru) { ^ include/linux/list.h:715:13: note: expanded from macro 'list_for_each_entry_safe' for (pos = list_first_entry(head, typeof(*pos), member), \ ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/kernel.h:495:61: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ mm/page_alloc.c:1526:2: note: Taking false branch list_for_each_entry_safe(page, tmp, &head, lru) { ^ include/linux/list.h:715:13: note: expanded from macro 'list_for_each_entry_safe' for (pos = list_first_entry(head, typeof(*pos), member), \ ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:302:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ mm/page_alloc.c:1526:2: note: Loop condition is false. Exiting loop list_for_each_entry_safe(page, tmp, &head, lru) { ^ include/linux/list.h:715:13: note: expanded from macro 'list_for_each_entry_safe' for (pos = list_first_entry(head, typeof(*pos), member), \ ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:300:2: note: expanded from macro '__compiletime_assert' do { \ ^ mm/page_alloc.c:1526:2: note: Assigned value is garbage or undefined list_for_each_entry_safe(page, tmp, &head, lru) { ^ include/linux/list.h:716:7: note: expanded from macro 'list_for_each_entry_safe' n = list_next_entry(pos, member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:555:2: note: expanded from macro 'list_next_entry' list_entry((pos)->member.next, typeof(*(pos)), member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:494:2: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^ ~~~~~~~~~~~~~ >> mm/page_alloc.c:3094:4: warning: Value stored to 'batch' is never read >> [clang-analyzer-deadcode.DeadStores] batch = max(batch >> order, 2); ^ mm/page_alloc.c:3094:4: note: Value stored to 'batch' is never read mm/page_alloc.c:5091:4: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] should_compact_retry(ac, order, alloc_flags, ^ mm/page_alloc.c:4915:28: note: Assuming 'order' is <= PAGE_ALLOC_COSTLY_ORDER const bool costly_order = order > PAGE_ALLOC_COSTLY_ORDER; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:4920:2: note: 'compact_result' declared without an initial value enum compact_result compact_result; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:4930:19: note: Assuming the condition is false if (WARN_ON_ONCE((gfp_mask & (__GFP_ATOMIC|__GFP_DIRECT_RECLAIM)) == ^ include/asm-generic/bug.h:104:25: note: expanded from macro 'WARN_ON_ONCE' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ mm/page_alloc.c:4930:6: note: Taking false branch if (WARN_ON_ONCE((gfp_mask & (__GFP_ATOMIC|__GFP_DIRECT_RECLAIM)) == ^ include/asm-generic/bug.h:105:2: note: expanded from macro 'WARN_ON_ONCE' if (unlikely(__ret_warn_on)) \ ^ mm/page_alloc.c:4930:2: note: Taking false branch if (WARN_ON_ONCE((gfp_mask & (__GFP_ATOMIC|__GFP_DIRECT_RECLAIM)) == ^ mm/page_alloc.c:4955:6: note: Assuming field 'zone' is null if (!ac->preferred_zoneref->zone) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:4955:2: note: Taking true branch if (!ac->preferred_zoneref->zone) ^ mm/page_alloc.c:4956:3: note: Control jumps to line 5120 goto nopage; ^ mm/page_alloc.c:5120:6: note: Calling 'check_retry_cpuset' if (check_retry_cpuset(cpuset_mems_cookie, ac)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:4891:6: note: Calling 'cpusets_enabled' if (cpusets_enabled() && ac->nodemask && ^~~~~~~~~~~~~~~~~ include/linux/cpuset.h:166:44: note: Returning zero, which participates in a condition later static inline bool cpusets_enabled(void) { return false; } ^~~~~~~~~~~~ mm/page_alloc.c:4891:6: note: Returning from 'cpusets_enabled' if (cpusets_enabled() && ac->nodemask && ^~~~~~~~~~~~~~~~~ mm/page_alloc.c:4891:24: note: Left side of '&&' is false if (cpusets_enabled() && ac->nodemask && ^ mm/page_alloc.c:4904:6: note: Calling 'read_mems_allowed_retry' if (read_mems_allowed_retry(cpuset_mems_cookie)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/cpuset.h:277:2: note: Returning zero, which participates in a condition later return false; ^~~~~~~~~~~~ mm/page_alloc.c:4904:6: note: Returning from 'read_mems_allowed_retry' if (read_mems_allowed_retry(cpuset_mems_cookie)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:4904:2: note: Taking false branch if (read_mems_allowed_retry(cpuset_mems_cookie)) ^ mm/page_alloc.c:4907:2: note: Returning zero, which participates in a condition later return false; ^~~~~~~~~~~~ mm/page_alloc.c:5120:6: note: Returning from 'check_retry_cpuset' if (check_retry_cpuset(cpuset_mems_cookie, ac)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:5120:2: note: Taking false branch if (check_retry_cpuset(cpuset_mems_cookie, ac)) ^ mm/page_alloc.c:5127:6: note: Assuming the condition is true if (gfp_mask & __GFP_NOFAIL) { ^~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:5127:2: note: Taking true branch if (gfp_mask & __GFP_NOFAIL) { ^ mm/page_alloc.c:5132:20: note: Assuming 'can_direct_reclaim' is true if (WARN_ON_ONCE(!can_direct_reclaim)) ^ include/asm-generic/bug.h:104:25: note: expanded from macro 'WARN_ON_ONCE' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ mm/page_alloc.c:5132:7: note: Taking false branch if (WARN_ON_ONCE(!can_direct_reclaim)) ^ include/asm-generic/bug.h:105:2: note: expanded from macro 'WARN_ON_ONCE' if (unlikely(__ret_warn_on)) \ ^ mm/page_alloc.c:5132:3: note: Taking false branch if (WARN_ON_ONCE(!can_direct_reclaim)) ^ mm/page_alloc.c:5140:3: note: Assuming the condition is true WARN_ON_ONCE(current->flags & PF_MEMALLOC); ^ include/asm-generic/bug.h:104:23: note: expanded from macro 'WARN_ON_ONCE' int __ret_warn_on = !!(condition); \ ^~~~~~~~~~~~ mm/page_alloc.c:5140:3: note: Taking false branch vim +/batch +3094 mm/page_alloc.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 3070 37b2d597bb542e Chris Goldsworthy 2020-11-16 3071 /* 37b2d597bb542e Chris Goldsworthy 2020-11-16 3072 * Return the pcp list that corresponds to the migrate type if that list isn't 37b2d597bb542e Chris Goldsworthy 2020-11-16 3073 * empty. 37b2d597bb542e Chris Goldsworthy 2020-11-16 3074 * If the list is empty return NULL. 37b2d597bb542e Chris Goldsworthy 2020-11-16 3075 */ 37b2d597bb542e Chris Goldsworthy 2020-11-16 3076 static struct list_head *get_populated_pcp_list(struct zone *zone, 37b2d597bb542e Chris Goldsworthy 2020-11-16 3077 unsigned int order, struct per_cpu_pages *pcp, 37b2d597bb542e Chris Goldsworthy 2020-11-16 3078 int migratetype, unsigned int alloc_flags) 37b2d597bb542e Chris Goldsworthy 2020-11-16 3079 { 37b2d597bb542e Chris Goldsworthy 2020-11-16 3080 struct list_head *list = &pcp->lists[order_to_pindex(migratetype, order)]; 37b2d597bb542e Chris Goldsworthy 2020-11-16 3081 37b2d597bb542e Chris Goldsworthy 2020-11-16 3082 if (list_empty(list)) { 37b2d597bb542e Chris Goldsworthy 2020-11-16 3083 int batch = READ_ONCE(pcp->batch); 37b2d597bb542e Chris Goldsworthy 2020-11-16 3084 int alloced; 37b2d597bb542e Chris Goldsworthy 2020-11-16 3085 37b2d597bb542e Chris Goldsworthy 2020-11-16 3086 /* 37b2d597bb542e Chris Goldsworthy 2020-11-16 3087 * Scale batch relative to order if batch implies 37b2d597bb542e Chris Goldsworthy 2020-11-16 3088 * free pages can be stored on the PCP. Batch can 37b2d597bb542e Chris Goldsworthy 2020-11-16 3089 * be 1 for small zones or for boot pagesets which 37b2d597bb542e Chris Goldsworthy 2020-11-16 3090 * should never store free pages as the pages may 37b2d597bb542e Chris Goldsworthy 2020-11-16 3091 * belong to arbitrary zones. 37b2d597bb542e Chris Goldsworthy 2020-11-16 3092 */ 37b2d597bb542e Chris Goldsworthy 2020-11-16 3093 if (batch > 1) 37b2d597bb542e Chris Goldsworthy 2020-11-16 @3094 batch = max(batch >> order, 2); 37b2d597bb542e Chris Goldsworthy 2020-11-16 3095 alloced = rmqueue_bulk(zone, order, pcp->batch, list, migratetype, alloc_flags); 37b2d597bb542e Chris Goldsworthy 2020-11-16 3096 37b2d597bb542e Chris Goldsworthy 2020-11-16 3097 pcp->count += alloced << order; 37b2d597bb542e Chris Goldsworthy 2020-11-16 3098 if (list_empty(list)) 37b2d597bb542e Chris Goldsworthy 2020-11-16 3099 list = NULL; 37b2d597bb542e Chris Goldsworthy 2020-11-16 3100 } 37b2d597bb542e Chris Goldsworthy 2020-11-16 3101 return list; 37b2d597bb542e Chris Goldsworthy 2020-11-16 3102 } 37b2d597bb542e Chris Goldsworthy 2020-11-16 3103 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
