From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Jan Kara <jack@suse.cz>, Ted Tso <tytso@mit.edu>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-ext4@vger.kernel.org,
Thorsten Leemhuis <regressions@leemhuis.info>,
Ojaswin Mujoo <ojaswin@linux.ibm.com>,
Stefan Wahren <stefan.wahren@i2se.com>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 5/5] ext4: Use buckets for cr 1 block scan instead of rbtree
Date: Thu, 8 Sep 2022 14:00:17 +0300 [thread overview]
Message-ID: <202209071206.u1iHKVzB-lkp@intel.com> (raw)
In-Reply-To: <20220906152920.25584-5-jack@suse.cz>
Hi Jan,
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jan-Kara/ext4-Fix-performance-regression-with-mballoc/20220907-000945
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 53e99dcff61e1523ec1c3628b2d564ba15d32eb7
config: m68k-randconfig-m041-20220906 (https://download.01.org/0day-ci/archive/20220907/202209071206.u1iHKVzB-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/ext4/mballoc.c:945 ext4_mb_choose_next_group_cr1() error: uninitialized symbol 'grp'.
vim +/grp +945 fs/ext4/mballoc.c
196e402adf2e4c Harshad Shirwadkar 2021-04-01 909 static void ext4_mb_choose_next_group_cr1(struct ext4_allocation_context *ac,
196e402adf2e4c Harshad Shirwadkar 2021-04-01 910 int *new_cr, ext4_group_t *group, ext4_group_t ngroups)
196e402adf2e4c Harshad Shirwadkar 2021-04-01 911 {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 912 struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
31b571b608cf66 Jan Kara 2022-09-06 913 struct ext4_group_info *grp, *iter;
31b571b608cf66 Jan Kara 2022-09-06 914 int i;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 915
196e402adf2e4c Harshad Shirwadkar 2021-04-01 916 if (unlikely(ac->ac_flags & EXT4_MB_CR1_OPTIMIZED)) {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 917 if (sbi->s_mb_stats)
196e402adf2e4c Harshad Shirwadkar 2021-04-01 918 atomic_inc(&sbi->s_bal_cr1_bad_suggestions);
31b571b608cf66 Jan Kara 2022-09-06 919 }
31b571b608cf66 Jan Kara 2022-09-06 920
31b571b608cf66 Jan Kara 2022-09-06 921 for (i = mb_avg_fragment_size_order(ac->ac_sb, ac->ac_g_ex.fe_len);
31b571b608cf66 Jan Kara 2022-09-06 922 i < MB_NUM_ORDERS(ac->ac_sb); i++) {
31b571b608cf66 Jan Kara 2022-09-06 923 if (list_empty(&sbi->s_mb_avg_fragment_size[i]))
31b571b608cf66 Jan Kara 2022-09-06 924 continue;
31b571b608cf66 Jan Kara 2022-09-06 925 read_lock(&sbi->s_mb_avg_fragment_size_locks[i]);
31b571b608cf66 Jan Kara 2022-09-06 926 if (list_empty(&sbi->s_mb_avg_fragment_size[i])) {
31b571b608cf66 Jan Kara 2022-09-06 927 read_unlock(&sbi->s_mb_largest_free_orders_locks[i]);
31b571b608cf66 Jan Kara 2022-09-06 928 continue;
Smatch worries that we can hit these two continues on every iteration.
Why not just initialize "grp = NULL;" at the start of the function?
31b571b608cf66 Jan Kara 2022-09-06 929 }
31b571b608cf66 Jan Kara 2022-09-06 930 grp = NULL;
31b571b608cf66 Jan Kara 2022-09-06 931 list_for_each_entry(iter, &sbi->s_mb_avg_fragment_size[i],
31b571b608cf66 Jan Kara 2022-09-06 932 bb_avg_fragment_size_node) {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 933 if (sbi->s_mb_stats)
196e402adf2e4c Harshad Shirwadkar 2021-04-01 934 atomic64_inc(&sbi->s_bal_cX_groups_considered[1]);
31b571b608cf66 Jan Kara 2022-09-06 935 if (likely(ext4_mb_good_group(ac, iter->bb_group, 1))) {
31b571b608cf66 Jan Kara 2022-09-06 936 grp = iter;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 937 break;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 938 }
196e402adf2e4c Harshad Shirwadkar 2021-04-01 939 }
31b571b608cf66 Jan Kara 2022-09-06 940 read_unlock(&sbi->s_mb_avg_fragment_size_locks[i]);
31b571b608cf66 Jan Kara 2022-09-06 941 if (grp)
31b571b608cf66 Jan Kara 2022-09-06 942 break;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 943 }
196e402adf2e4c Harshad Shirwadkar 2021-04-01 944
31b571b608cf66 Jan Kara 2022-09-06 @945 if (grp) {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 946 *group = grp->bb_group;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 947 ac->ac_flags |= EXT4_MB_CR1_OPTIMIZED;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 948 } else {
196e402adf2e4c Harshad Shirwadkar 2021-04-01 949 *new_cr = 2;
196e402adf2e4c Harshad Shirwadkar 2021-04-01 950 }
196e402adf2e4c Harshad Shirwadkar 2021-04-01 951 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-09-08 11:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 15:29 [PATCH 0/5 v2] ext4: Fix performance regression with mballoc Jan Kara
2022-09-06 15:29 ` [PATCH 1/5] ext4: Make mballoc try target group first even with mb_optimize_scan Jan Kara
2022-09-07 17:43 ` Ritesh Harjani (IBM)
2022-09-06 15:29 ` [PATCH 2/5] ext4: Avoid unnecessary spreading of allocations among groups Jan Kara
2022-09-07 18:05 ` Ritesh Harjani (IBM)
2022-09-08 8:57 ` Jan Kara
2022-09-08 9:24 ` Ritesh Harjani (IBM)
2022-09-06 15:29 ` [PATCH 3/5] ext4: Make directory inode spreading reflect flexbg size Jan Kara
2022-09-06 15:29 ` [PATCH 4/5] ext4: Use locality group preallocation for small closed files Jan Kara
2022-09-07 18:25 ` Ritesh Harjani (IBM)
2022-09-06 15:29 ` [PATCH 5/5] ext4: Use buckets for cr 1 block scan instead of rbtree Jan Kara
2022-09-07 18:41 ` Ritesh Harjani (IBM)
2022-09-08 9:01 ` Jan Kara
2022-09-08 9:23 ` Ritesh Harjani (IBM)
2022-09-08 8:29 ` Ojaswin Mujoo
2022-09-08 9:03 ` Jan Kara
2022-09-08 11:00 ` Dan Carpenter [this message]
2022-09-08 11:33 ` Jan Kara
2022-09-06 20:38 ` [PATCH 0/5 v2] ext4: Fix performance regression with mballoc Stefan Wahren
2022-09-07 10:49 ` Jan Kara
2022-09-07 13:02 ` Jan Kara
2022-09-08 8:17 ` Ojaswin Mujoo
2022-09-08 9:12 ` Jan Kara
-- strict thread matches above, loose matches on Subject: below --
2022-09-08 9:21 [PATCH 0/5 v3] " Jan Kara
2022-09-08 9:21 ` [PATCH 5/5] ext4: Use buckets for cr 1 block scan instead of rbtree Jan Kara
2022-09-09 6:12 ` Ritesh Harjani (IBM)
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=202209071206.u1iHKVzB-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=adilger.kernel@dilger.ca \
--cc=jack@suse.cz \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-ext4@vger.kernel.org \
--cc=lkp@intel.com \
--cc=ojaswin@linux.ibm.com \
--cc=regressions@leemhuis.info \
--cc=stefan.wahren@i2se.com \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).