Re: [PATCH linus/master 1/2] rcuperf: Add ability to increase object allocation size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "Joel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]

url:    https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/rcuperf-Add-ability-to-increase-object-allocation-size/20200306-064829
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9f65ed5fe41ce08ed1cb1f6a950f9ec694c142ad
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=c6x 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:15,
                    from kernel//rcu/rcuperf.c:13:
   kernel//rcu/rcuperf.c: In function 'kfree_perf_init':
   include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:9:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
                       ^~~~~~~~
>> include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ALERT'
     printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~~
>> kernel//rcu/rcuperf.c:716:2: note: in expansion of macro 'pr_alert'
     pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj));
     ^~~~~~~~
   kernel//rcu/rcuperf.c:716:32: note: format string is defined here
     pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj));
                                 ~~^
                                 %u
--
   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:15,
                    from kernel/rcu/rcuperf.c:13:
   kernel/rcu/rcuperf.c: In function 'kfree_perf_init':
   include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:9:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */
                       ^~~~~~~~
>> include/linux/printk.h:300:9: note: in expansion of macro 'KERN_ALERT'
     printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~~
   kernel/rcu/rcuperf.c:716:2: note: in expansion of macro 'pr_alert'
     pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj));
     ^~~~~~~~
   kernel/rcu/rcuperf.c:716:32: note: format string is defined here
     pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj));
                                 ~~^
                                 %u

vim +/pr_alert +716 kernel//rcu/rcuperf.c

   698	
   699	static int __init
   700	kfree_perf_init(void)
   701	{
   702		long i;
   703		int firsterr = 0;
   704	
   705		kfree_nrealthreads = compute_real(kfree_nthreads);
   706		/* Start up the kthreads. */
   707		if (shutdown) {
   708			init_waitqueue_head(&shutdown_wq);
   709			firsterr = torture_create_kthread(kfree_perf_shutdown, NULL,
   710							  shutdown_task);
   711			if (firsterr)
   712				goto unwind;
   713			schedule_timeout_uninterruptible(1);
   714		}
   715	
 > 716		pr_alert("kfree object size=%lu\n", kfree_mult * sizeof(struct kfree_obj));
   717	
   718		kfree_reader_tasks = kcalloc(kfree_nrealthreads, sizeof(kfree_reader_tasks[0]),
   719				       GFP_KERNEL);
   720		if (kfree_reader_tasks == NULL) {
   721			firsterr = -ENOMEM;
   722			goto unwind;
   723		}
   724	
   725		for (i = 0; i < kfree_nrealthreads; i++) {
   726			firsterr = torture_create_kthread(kfree_perf_thread, (void *)i,
   727							  kfree_reader_tasks[i]);
   728			if (firsterr)
   729				goto unwind;
   730		}
   731	
   732		while (atomic_read(&n_kfree_perf_thread_started) < kfree_nrealthreads)
   733			schedule_timeout_uninterruptible(1);
   734	
   735		torture_init_end();
   736		return 0;
   737	
   738	unwind:
   739		torture_init_end();
   740		kfree_perf_cleanup();
   741		return firsterr;
   742	}
   743	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux