CC: [email protected] CC: [email protected] TO: "Matthew Wilcox (Oracle)" <[email protected]> CC: Andrew Morton <[email protected]> CC: Linux Memory Management List <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3bb61aa61828499a7d0f5e560051625fd02ae7e4 commit: 9dfc8ff34b951f83632815a87e97a625a11360f0 i915: use find_lock_page instead of find_lock_entry date: 7 weeks ago :::::: branch date: 2 hours ago :::::: commit date: 7 weeks ago compiler: sh4-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> "cppcheck warnings: (new ones prefixed by >>)" mm/slab.c:3308:7: warning: Redundant assignment of 'objp' to itself. [selfAssignment] objp = cache_alloc_debugcheck_after(cachep, flags, objp, caller); ^ mm/slab.c:3440:7: warning: Redundant assignment of 'objp' to itself. [selfAssignment] objp = cache_free_debugcheck(cachep, objp, caller); ^ mm/slab.c:3500:8: warning: Redundant assignment of 'p[i]' to itself. [selfAssignment] p[i] = cache_alloc_debugcheck_after(s, flags, p[i], caller); ^ cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> mm/slab.c:3858:22: warning: Same expression on both sides of '&&' because >> 'batchcount' and 'shared' represent the same value. [knownConditionTrueFalse] if (limit && shared && batchcount) ^ mm/slab.c:3852:19: note: 'batchcount' is assigned value '0' here. int batchcount = 0; ^ mm/slab.c:3851:15: note: 'shared' is assigned value '0' here. int shared = 0; ^ mm/slab.c:3858:22: note: Same expression on both sides of '&&' because 'batchcount' and 'shared' represent the same value. if (limit && shared && batchcount) ^ vim +3858 mm/slab.c ^1da177e4c3f415 Linus Torvalds 2005-04-16 3845 18004c5d4084d96 Christoph Lameter 2012-07-06 3846 /* Called with slab_mutex held always */ 83b519e8b9572c3 Pekka Enberg 2009-06-10 3847 static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3848 { ^1da177e4c3f415 Linus Torvalds 2005-04-16 3849 int err; 943a451a87d229c Glauber Costa 2012-12-18 3850 int limit = 0; 943a451a87d229c Glauber Costa 2012-12-18 3851 int shared = 0; 943a451a87d229c Glauber Costa 2012-12-18 3852 int batchcount = 0; 943a451a87d229c Glauber Costa 2012-12-18 3853 7c00fce98c3e153 Thomas Garnier 2016-07-26 3854 err = cache_random_seq_create(cachep, cachep->num, gfp); c7ce4f60ac199fb Thomas Garnier 2016-05-19 3855 if (err) c7ce4f60ac199fb Thomas Garnier 2016-05-19 3856 goto end; c7ce4f60ac199fb Thomas Garnier 2016-05-19 3857 943a451a87d229c Glauber Costa 2012-12-18 @3858 if (limit && shared && batchcount) 943a451a87d229c Glauber Costa 2012-12-18 3859 goto skip_setup; a737b3e2fcf96f5 Andrew Morton 2006-03-22 3860 /* a737b3e2fcf96f5 Andrew Morton 2006-03-22 3861 * The head array serves three purposes: ^1da177e4c3f415 Linus Torvalds 2005-04-16 3862 * - create a LIFO ordering, i.e. return objects that are cache-warm ^1da177e4c3f415 Linus Torvalds 2005-04-16 3863 * - reduce the number of spinlock operations. ^1da177e4c3f415 Linus Torvalds 2005-04-16 3864 * - reduce the number of linked list operations on the slab and ^1da177e4c3f415 Linus Torvalds 2005-04-16 3865 * bufctl chains: array operations are cheaper. ^1da177e4c3f415 Linus Torvalds 2005-04-16 3866 * The numbers are guessed, we should auto-tune as described by ^1da177e4c3f415 Linus Torvalds 2005-04-16 3867 * Bonwick. ^1da177e4c3f415 Linus Torvalds 2005-04-16 3868 */ 3b0efdfa1e71930 Christoph Lameter 2012-06-13 3869 if (cachep->size > 131072) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3870 limit = 1; 3b0efdfa1e71930 Christoph Lameter 2012-06-13 3871 else if (cachep->size > PAGE_SIZE) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3872 limit = 8; 3b0efdfa1e71930 Christoph Lameter 2012-06-13 3873 else if (cachep->size > 1024) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3874 limit = 24; 3b0efdfa1e71930 Christoph Lameter 2012-06-13 3875 else if (cachep->size > 256) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3876 limit = 54; ^1da177e4c3f415 Linus Torvalds 2005-04-16 3877 else ^1da177e4c3f415 Linus Torvalds 2005-04-16 3878 limit = 120; ^1da177e4c3f415 Linus Torvalds 2005-04-16 3879 a737b3e2fcf96f5 Andrew Morton 2006-03-22 3880 /* a737b3e2fcf96f5 Andrew Morton 2006-03-22 3881 * CPU bound tasks (e.g. network routing) can exhibit cpu bound ^1da177e4c3f415 Linus Torvalds 2005-04-16 3882 * allocation behaviour: Most allocs on one cpu, most free operations ^1da177e4c3f415 Linus Torvalds 2005-04-16 3883 * on another cpu. For these cases, an efficient object passing between ^1da177e4c3f415 Linus Torvalds 2005-04-16 3884 * cpus is necessary. This is provided by a shared array. The array ^1da177e4c3f415 Linus Torvalds 2005-04-16 3885 * replaces Bonwick's magazine layer. ^1da177e4c3f415 Linus Torvalds 2005-04-16 3886 * On uniprocessor, it's functionally equivalent (but less efficient) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3887 * to a larger limit. Thus disabled by default. ^1da177e4c3f415 Linus Torvalds 2005-04-16 3888 */ ^1da177e4c3f415 Linus Torvalds 2005-04-16 3889 shared = 0; 3b0efdfa1e71930 Christoph Lameter 2012-06-13 3890 if (cachep->size <= PAGE_SIZE && num_possible_cpus() > 1) ^1da177e4c3f415 Linus Torvalds 2005-04-16 3891 shared = 8; ^1da177e4c3f415 Linus Torvalds 2005-04-16 3892 :::::: The code at line 3858 was first introduced by commit :::::: 943a451a87d229ca564a27274b58eaeae35fde5d slab: propagate tunable values :::::: TO: Glauber Costa <[email protected]> :::::: CC: Linus Torvalds <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
