From: kernel test robot <lkp@intel.com>
To: John Garry <john.garry@huawei.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 2/2] sbitmap: Spread sbitmap word allocation over NUMA nodes
Date: Wed, 11 May 2022 03:31:03 +0800 [thread overview]
Message-ID: <202205110332.EbWRHZ10-lkp@intel.com> (raw)
In-Reply-To: <1652181274-136198-3-git-send-email-john.garry@huawei.com>
Hi John,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linux/master linus/master v5.18-rc6 next-20220510]
[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/intel-lab-lkp/linux/commits/John-Garry/sbitmap-NUMA-node-spreading/20220510-192122
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-a003-20220509 (https://download.01.org/0day-ci/archive/20220511/202205110332.EbWRHZ10-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
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/intel-lab-lkp/linux/commit/9cb4cd7060790dcb3d7f9405c11a0da884a0c616
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review John-Garry/sbitmap-NUMA-node-spreading/20220510-192122
git checkout 9cb4cd7060790dcb3d7f9405c11a0da884a0c616
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> lib/sbitmap.c:138:63: warning: variable 'map_nr_cnt' is uninitialized when used here [-Wuninitialized]
for (index = 0, nid = 0; index < sb->map_nr; index++, map++, map_nr_cnt++) {
^~~~~~~~~~
lib/sbitmap.c:103:21: note: initialize the variable 'map_nr_cnt' to silence this warning
int nid, map_nr_cnt;
^
= 0
1 warning generated.
vim +/map_nr_cnt +138 lib/sbitmap.c
95
96 int sbitmap_init_node(struct sbitmap *sb, unsigned int depth, int shift,
97 gfp_t flags, int node, bool round_robin,
98 bool alloc_hint)
99 {
100 unsigned int bits_per_word;
101 struct sbitmap_word *map;
102 int index, num_nodes = num_online_nodes();
103 int nid, map_nr_cnt;
104
105 if (shift < 0)
106 shift = sbitmap_calculate_shift(depth);
107
108 bits_per_word = 1U << shift;
109 if (bits_per_word > BITS_PER_LONG)
110 return -EINVAL;
111
112 sb->shift = shift;
113 sb->depth = depth;
114 sb->map_nr = DIV_ROUND_UP(sb->depth, bits_per_word);
115 sb->round_robin = round_robin;
116
117 if (depth == 0) {
118 sb->map = NULL;
119 return 0;
120 }
121
122 if (sb->map_nr < num_nodes) {
123 sb->map_nr_per_node = 1;
124 } else {
125 sb->map_nr_per_node = sb->map_nr / num_nodes;
126 }
127 if (alloc_hint) {
128 if (init_alloc_hint(sb, flags))
129 return -ENOMEM;
130 } else {
131 sb->alloc_hint = NULL;
132 }
133
134 sb->map = kvzalloc_node(sb->map_nr * sizeof(*sb->map), flags, node);
135 if (!sb->map)
136 goto err_map;
137
> 138 for (index = 0, nid = 0; index < sb->map_nr; index++, map++, map_nr_cnt++) {
139 struct sbitmap_word **_map;
140
141 if ((index % sb->map_nr_per_node) == 0) {
142 int cnt;
143
144 if (index == 0) {
145 cnt = sb->map_nr_per_node +
146 (sb->map_nr % sb->map_nr_per_node);
147 } else {
148 cnt = sb->map_nr_per_node;
149 }
150
151 map = kvzalloc_node(cnt * sizeof(**sb->map), flags, nid);
152 if (!map)
153 goto err_map_numa;
154 nid++;
155 }
156
157 _map = &sb->map[index];
158 *_map = map;
159 }
160
161 return 0;
162 err_map_numa:
163 for (index = 0; index < sb->map_nr; index++, map++) {
164 if ((index % sb->map_nr_per_node) == 0) {
165 kfree(map);
166 }
167 }
168 err_map:
169 free_percpu(sb->alloc_hint);
170
171 return -ENOMEM;
172 }
173 EXPORT_SYMBOL_GPL(sbitmap_init_node);
174
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-05-10 19:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 11:14 [RFC PATCH 0/2] sbitmap: NUMA node spreading John Garry
2022-05-10 11:14 ` [RFC PATCH 1/2] sbitmap: Make sbitmap.map a double pointer John Garry
2022-05-10 11:14 ` [RFC PATCH 2/2] sbitmap: Spread sbitmap word allocation over NUMA nodes John Garry
2022-05-10 19:31 ` kernel test robot [this message]
2022-05-10 12:50 ` [RFC PATCH 0/2] sbitmap: NUMA node spreading Jens Axboe
2022-05-10 13:44 ` John Garry
2022-05-10 14:34 ` Jens Axboe
2022-05-10 15:03 ` John Garry
2022-05-11 2:07 ` Ming Lei
2022-05-11 9:57 ` John Garry
-- strict thread matches above, loose matches on Subject: below --
2022-05-11 8:54 [RFC PATCH 2/2] sbitmap: Spread sbitmap word allocation over NUMA nodes kernel test robot
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=202205110332.EbWRHZ10-lkp@intel.com \
--to=lkp@intel.com \
--cc=john.garry@huawei.com \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
/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.