Re: [PREEMPT_RT PATCH 1/2] block: Avoid sleeping function called from invalid context bug

From
kernel test robot <hidden>
Date
2021-12-11 05:21:35
Also in
lkml, llvm, oe-kbuild-all
Reply to
Wander Lairson Costa, 2021-12-10
Hi Wander,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on linux/master linus/master v5.16-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Wander-Lairson-Costa/Fix-warnings-in-blktrace/20211211-044405
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-a016-20211210 (https://download.01.org/0day-ci/archive/20211211/202112111300.2jYSEVK1-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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
        # https://github.com/0day-ci/linux/commit/37b10b13961fb1af60139789717a018f788f714e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Wander-Lairson-Costa/Fix-warnings-in-blktrace/20211211-044405
        git checkout 37b10b13961fb1af60139789717a018f788f714e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):
quoted
block/blk-cgroup.c:1915:8: error: implicit declaration of function 'get_cpu_light' [-Werror,-Wimplicit-function-declaration]
           cpu = get_cpu_light();
                 ^
quoted
block/blk-cgroup.c:1932:2: error: implicit declaration of function 'put_cpu_light' [-Werror,-Wimplicit-function-declaration]
           put_cpu_light();
           ^
   block/blk-cgroup.c:1932:2: note: did you mean 'get_cpu_light'?
   block/blk-cgroup.c:1915:8: note: 'get_cpu_light' declared here
           cpu = get_cpu_light();
                 ^
   2 errors generated.


vim +/get_cpu_light +1915 block/blk-cgroup.c

  1908	
  1909	void blk_cgroup_bio_start(struct bio *bio)
  1910	{
  1911		int rwd = blk_cgroup_io_type(bio), cpu;
  1912		struct blkg_iostat_set *bis;
  1913		unsigned long flags;
  1914	
1915		cpu = get_cpu_light();
  1916		bis = per_cpu_ptr(bio->bi_blkg->iostat_cpu, cpu);
  1917		flags = u64_stats_update_begin_irqsave(&bis->sync);
  1918	
  1919		/*
  1920		 * If the bio is flagged with BIO_CGROUP_ACCT it means this is a split
  1921		 * bio and we would have already accounted for the size of the bio.
  1922		 */
  1923		if (!bio_flagged(bio, BIO_CGROUP_ACCT)) {
  1924			bio_set_flag(bio, BIO_CGROUP_ACCT);
  1925			bis->cur.bytes[rwd] += bio->bi_iter.bi_size;
  1926		}
  1927		bis->cur.ios[rwd]++;
  1928	
  1929		u64_stats_update_end_irqrestore(&bis->sync, flags);
  1930		if (cgroup_subsys_on_dfl(io_cgrp_subsys))
  1931			cgroup_rstat_updated(bio->bi_blkg->blkcg->css.cgroup, cpu);
1932		put_cpu_light();
  1933	}
  1934	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Thread (6 messages) 6 messages, 2 authors, last reply 2021-12-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help