All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH V3 4/5] ext4: get discard out of jbd2 commit kthread contex
Date: Tue, 27 Jul 2021 04:30:31 +0800	[thread overview]
Message-ID: <202107270436.HnDa4AMd-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9859 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210724074124.25731-5-jianchao.wan9@gmail.com>
References: <20210724074124.25731-5-jianchao.wan9@gmail.com>
TO: Wang Jianchao <jianchao.wan9@gmail.com>
TO: linux-ext4(a)vger.kernel.org
TO: linux-kernel(a)vger.kernel.org
CC: tytso(a)mit.edu
CC: adilger.kernel(a)dilger.ca

Hi Wang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ext4/dev]
[also build test WARNING on linux/master linus/master v5.14-rc3 next-20210723]
[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/Wang-Jianchao/ext4-get-discard-out-of-jbd2-commit-context/20210724-154426
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: mips-randconfig-s031-20210726 (attached as .config)
compiler: mips-linux-gcc (GCC) 10.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/c1714c046fe748ad2324623d650c2dfe5b3b7a55
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Wang-Jianchao/ext4-get-discard-out-of-jbd2-commit-context/20210724-154426
        git checkout c1714c046fe748ad2324623d650c2dfe5b3b7a55
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash fs/ext4/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   command-line: note: in included file:
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
   builtin:0:0: sparse: this was the original definition
   fs/ext4/mballoc.c:994:9: sparse: sparse: context imbalance in 'ext4_mb_choose_next_group_cr1' - wrong count at exit
   fs/ext4/mballoc.c:1264:9: sparse: sparse: context imbalance in 'ext4_mb_init_cache' - different lock contexts for basic block
   fs/ext4/mballoc.c:2168:5: sparse: sparse: context imbalance in 'ext4_mb_try_best_found' - different lock contexts for basic block
   fs/ext4/mballoc.c:2196:5: sparse: sparse: context imbalance in 'ext4_mb_find_by_goal' - different lock contexts for basic block
   fs/ext4/mballoc.c:2483:12: sparse: sparse: context imbalance in 'ext4_mb_good_group_nolock' - wrong count at exit
   fs/ext4/mballoc.c:2698:87: sparse: sparse: context imbalance in 'ext4_mb_regular_allocator' - different lock contexts for basic block
   fs/ext4/mballoc.c:2972:13: sparse: sparse: context imbalance in 'ext4_mb_seq_structs_summary_start' - wrong count at exit
   fs/ext4/mballoc.c:3044:13: sparse: sparse: context imbalance in 'ext4_mb_seq_structs_summary_stop' - unexpected unlock
>> fs/ext4/mballoc.c:3333:9: sparse: sparse: context imbalance in 'ext4_discard_work' - different lock contexts for basic block
   fs/ext4/mballoc.c:3542:17: sparse: sparse: context imbalance in 'ext4_mb_release' - different lock contexts for basic block
   fs/ext4/mballoc.c:3662:26: sparse: sparse: context imbalance in 'ext4_free_data_in_buddy' - wrong count at exit
   fs/ext4/mballoc.c:3873:15: sparse: sparse: context imbalance in 'ext4_mb_mark_diskspace_used' - different lock contexts for basic block
   fs/ext4/mballoc.c:3881:6: sparse: sparse: context imbalance in 'ext4_mb_mark_bb' - different lock contexts for basic block
   fs/ext4/mballoc.c:4203:13: sparse: sparse: context imbalance in 'ext4_discard_allocated_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:4505:13: sparse: sparse: context imbalance in 'ext4_mb_put_pa' - different lock contexts for basic block
   fs/ext4/mballoc.c:4842:9: sparse: sparse: context imbalance in 'ext4_mb_discard_group_preallocations' - different lock contexts for basic block
   fs/ext4/mballoc.c:4995:9: sparse: sparse: context imbalance in 'ext4_discard_preallocations' - different lock contexts for basic block
   fs/ext4/mballoc.c:5062:9: sparse: sparse: context imbalance in 'ext4_mb_show_ac' - different lock contexts for basic block
   fs/ext4/mballoc.c:5290:9: sparse: sparse: context imbalance in 'ext4_mb_discard_lg_preallocations' - different lock contexts for basic block
   fs/ext4/mballoc.c:5062:9: sparse: sparse: context imbalance in 'ext4_mb_new_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:5935:9: sparse: sparse: context imbalance in 'ext4_free_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:6235:15: sparse: sparse: context imbalance in 'ext4_group_add_blocks' - different lock contexts for basic block
   fs/ext4/mballoc.c:6275:24: sparse: sparse: context imbalance in 'ext4_trim_extent' - wrong count at exit
   fs/ext4/mballoc.c:6325:9: sparse: sparse: context imbalance in 'ext4_try_to_trim_range' - different lock contexts for basic block
   fs/ext4/mballoc.c:6342:1: sparse: sparse: context imbalance in 'ext4_trim_all_free' - different lock contexts for basic block
   fs/ext4/mballoc.c:6471:1: sparse: sparse: context imbalance in 'ext4_mballoc_query_range' - different lock contexts for basic block

vim +/ext4_discard_work +3333 fs/ext4/mballoc.c

2892c15ddda6a7 Eric Sandeen  2011-02-12  3315  
c1714c046fe748 Wang Jianchao 2021-07-24  3316  static void ext4_discard_work(struct work_struct *work)
c1714c046fe748 Wang Jianchao 2021-07-24  3317  {
c1714c046fe748 Wang Jianchao 2021-07-24  3318  	struct ext4_sb_info *sbi = container_of(work,
c1714c046fe748 Wang Jianchao 2021-07-24  3319  			struct ext4_sb_info, s_discard_work);
c1714c046fe748 Wang Jianchao 2021-07-24  3320  	struct super_block *sb = sbi->s_sb;
c1714c046fe748 Wang Jianchao 2021-07-24  3321  	struct ext4_free_data *fd, *nfd;
c1714c046fe748 Wang Jianchao 2021-07-24  3322  	struct ext4_buddy e4b;
c1714c046fe748 Wang Jianchao 2021-07-24  3323  	struct list_head discard_list;
c1714c046fe748 Wang Jianchao 2021-07-24  3324  	ext4_group_t grp, load_grp;
c1714c046fe748 Wang Jianchao 2021-07-24  3325  	int err = 0;
c1714c046fe748 Wang Jianchao 2021-07-24  3326  
c1714c046fe748 Wang Jianchao 2021-07-24  3327  	INIT_LIST_HEAD(&discard_list);
c1714c046fe748 Wang Jianchao 2021-07-24  3328  	spin_lock(&sbi->s_md_lock);
c1714c046fe748 Wang Jianchao 2021-07-24  3329  	list_splice_init(&sbi->s_discard_list, &discard_list);
c1714c046fe748 Wang Jianchao 2021-07-24  3330  	spin_unlock(&sbi->s_md_lock);
c1714c046fe748 Wang Jianchao 2021-07-24  3331  
c1714c046fe748 Wang Jianchao 2021-07-24  3332  	load_grp = UINT_MAX;
c1714c046fe748 Wang Jianchao 2021-07-24 @3333  	list_for_each_entry_safe(fd, nfd, &discard_list, efd_list) {
c1714c046fe748 Wang Jianchao 2021-07-24  3334  		/*
c1714c046fe748 Wang Jianchao 2021-07-24  3335  		 * If filesystem is umounting or no memory, give up the discard
c1714c046fe748 Wang Jianchao 2021-07-24  3336  		 */
c1714c046fe748 Wang Jianchao 2021-07-24  3337  		if ((sb->s_flags & SB_ACTIVE) && !err) {
c1714c046fe748 Wang Jianchao 2021-07-24  3338  			grp = fd->efd_group;
c1714c046fe748 Wang Jianchao 2021-07-24  3339  			if (grp != load_grp) {
c1714c046fe748 Wang Jianchao 2021-07-24  3340  				if (load_grp != UINT_MAX)
c1714c046fe748 Wang Jianchao 2021-07-24  3341  					ext4_mb_unload_buddy(&e4b);
c1714c046fe748 Wang Jianchao 2021-07-24  3342  
c1714c046fe748 Wang Jianchao 2021-07-24  3343  				err = ext4_mb_load_buddy(sb, grp, &e4b);
c1714c046fe748 Wang Jianchao 2021-07-24  3344  				if (err) {
c1714c046fe748 Wang Jianchao 2021-07-24  3345  					kmem_cache_free(ext4_free_data_cachep, fd);
c1714c046fe748 Wang Jianchao 2021-07-24  3346  					load_grp = UINT_MAX;
c1714c046fe748 Wang Jianchao 2021-07-24  3347  					continue;
c1714c046fe748 Wang Jianchao 2021-07-24  3348  				} else {
c1714c046fe748 Wang Jianchao 2021-07-24  3349  					load_grp = grp;
c1714c046fe748 Wang Jianchao 2021-07-24  3350  				}
c1714c046fe748 Wang Jianchao 2021-07-24  3351  			}
c1714c046fe748 Wang Jianchao 2021-07-24  3352  
c1714c046fe748 Wang Jianchao 2021-07-24  3353  			ext4_lock_group(sb, grp);
c1714c046fe748 Wang Jianchao 2021-07-24  3354  			ext4_try_to_trim_range(sb, &e4b, fd->efd_start_cluster,
c1714c046fe748 Wang Jianchao 2021-07-24  3355  						fd->efd_start_cluster + fd->efd_count - 1, 1);
c1714c046fe748 Wang Jianchao 2021-07-24  3356  			ext4_unlock_group(sb, grp);
c1714c046fe748 Wang Jianchao 2021-07-24  3357  		}
c1714c046fe748 Wang Jianchao 2021-07-24  3358  		kmem_cache_free(ext4_free_data_cachep, fd);
c1714c046fe748 Wang Jianchao 2021-07-24  3359  	}
c1714c046fe748 Wang Jianchao 2021-07-24  3360  
c1714c046fe748 Wang Jianchao 2021-07-24  3361  	if (load_grp != UINT_MAX)
c1714c046fe748 Wang Jianchao 2021-07-24  3362  		ext4_mb_unload_buddy(&e4b);
c1714c046fe748 Wang Jianchao 2021-07-24  3363  }
c1714c046fe748 Wang Jianchao 2021-07-24  3364  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36123 bytes --]

             reply	other threads:[~2021-07-26 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 20:30 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-24  7:41 [PATCH V3 0/5] ext4: get discard out of jbd2 commit context Wang Jianchao
2021-07-24  7:41 ` [PATCH V3 4/5] ext4: get discard out of jbd2 commit kthread contex Wang Jianchao
2021-08-04 15:45   ` Jan Kara
2021-08-26  7:15     ` Wang Jianchao
2021-08-12 19:46   ` Theodore Ts'o
2021-08-26  7:51     ` Wang Jianchao
2021-08-26  8:58       ` Wang Jianchao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107270436.HnDa4AMd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.