From: kernel test robot <lkp@intel.com>
To: Jiebin Sun <jiebin.sun@intel.com>,
akpm@linux-foundation.org, vasily.averin@linux.dev,
shakeelb@google.com, dennis@kernel.org, tj@kernel.org,
cl@linux.com, ebiederm@xmission.com, legion@kernel.org,
manfred@colorfullife.com, alexander.mikhalitsyn@virtuozzo.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, tim.c.chen@intel.com,
feng.tang@intel.com, ying.huang@intel.com, tianyou.li@intel.com,
wangyang.guo@intel.com, jiebin.sun@intel.com
Subject: Re: [PATCH v5 1/2] percpu: Add percpu_counter_add_local and percpu_counter_sub_local
Date: Sat, 10 Sep 2022 09:37:13 +0800 [thread overview]
Message-ID: <202209100911.HBo9ZqIU-lkp@intel.com> (raw)
In-Reply-To: <20220909203636.2652466-2-jiebin.sun@intel.com>
Hi Jiebin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v6.0-rc4 next-20220909]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jiebin-Sun/percpu-Add-percpu_counter_add_local-and-percpu_counter_sub_local/20220910-053730
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220910/202209100911.HBo9ZqIU-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/44e7288c01b9b125c7a5f97591ca26ffd90e3385
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jiebin-Sun/percpu-Add-percpu_counter_add_local-and-percpu_counter_sub_local/20220910-053730
git checkout 44e7288c01b9b125c7a5f97591ca26ffd90e3385
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 prepare
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/sched/user.h:7,
from include/linux/cred.h:17,
from include/linux/sched/signal.h:10,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/percpu_counter.h: In function 'percpu_counter_sub_local':
>> include/linux/percpu_counter.h:176:9: error: implicit declaration of function 'percpu_counter_sub'; did you mean 'percpu_counter_set'? [-Werror=implicit-function-declaration]
176 | percpu_counter_sub(fbc, amount);
| ^~~~~~~~~~~~~~~~~~
| percpu_counter_set
include/linux/percpu_counter.h: At top level:
>> include/linux/percpu_counter.h:229:20: warning: conflicting types for 'percpu_counter_sub'; have 'void(struct percpu_counter *, s64)' {aka 'void(struct percpu_counter *, long long int)'}
229 | static inline void percpu_counter_sub(struct percpu_counter *fbc, s64 amount)
| ^~~~~~~~~~~~~~~~~~
>> include/linux/percpu_counter.h:229:20: error: static declaration of 'percpu_counter_sub' follows non-static declaration
include/linux/percpu_counter.h:176:9: note: previous implicit declaration of 'percpu_counter_sub' with type 'void(struct percpu_counter *, s64)' {aka 'void(struct percpu_counter *, long long int)'}
176 | percpu_counter_sub(fbc, amount);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1206: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +176 include/linux/percpu_counter.h
171
172 /* no smp percpu_counter_sub_local is the same with percpu_counter_sub */
173 static inline void
174 percpu_counter_sub_local(struct percpu_counter *fbc, s64 amount)
175 {
> 176 percpu_counter_sub(fbc, amount);
177 }
178
179 static inline void
180 percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
181 {
182 percpu_counter_add(fbc, amount);
183 }
184
185 static inline s64 percpu_counter_read(struct percpu_counter *fbc)
186 {
187 return fbc->count;
188 }
189
190 /*
191 * percpu_counter is intended to track positive numbers. In the UP case the
192 * number should never be negative.
193 */
194 static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
195 {
196 return fbc->count;
197 }
198
199 static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
200 {
201 return percpu_counter_read_positive(fbc);
202 }
203
204 static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
205 {
206 return percpu_counter_read(fbc);
207 }
208
209 static inline bool percpu_counter_initialized(struct percpu_counter *fbc)
210 {
211 return true;
212 }
213
214 static inline void percpu_counter_sync(struct percpu_counter *fbc)
215 {
216 }
217 #endif /* CONFIG_SMP */
218
219 static inline void percpu_counter_inc(struct percpu_counter *fbc)
220 {
221 percpu_counter_add(fbc, 1);
222 }
223
224 static inline void percpu_counter_dec(struct percpu_counter *fbc)
225 {
226 percpu_counter_add(fbc, -1);
227 }
228
> 229 static inline void percpu_counter_sub(struct percpu_counter *fbc, s64 amount)
230 {
231 percpu_counter_add(fbc, -amount);
232 }
233
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-09-10 1:37 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 15:22 [PATCH] ipc/msg.c: mitigate the lock contention with percpu counter Jiebin Sun
2022-09-02 16:06 ` Andrew Morton
2022-09-05 11:54 ` Sun, Jiebin
2022-09-02 16:27 ` Shakeel Butt
2022-09-05 12:02 ` Sun, Jiebin
2022-09-06 18:44 ` Tim Chen
2022-09-07 9:39 ` Sun, Jiebin
2022-09-07 20:43 ` Andrew Morton
2022-09-07 17:25 ` [PATCH v4] ipc/msg: " Jiebin Sun
2022-09-07 16:01 ` Tim Chen
2022-09-07 21:34 ` Andrew Morton
2022-09-07 22:10 ` Tim Chen
2022-09-08 8:25 ` Sun, Jiebin
2022-09-08 15:38 ` Andrew Morton
2022-09-08 16:15 ` Dennis Zhou
2022-09-03 19:35 ` [PATCH] ipc/msg.c: " Manfred Spraul
2022-09-05 12:12 ` Sun, Jiebin
[not found] ` <20220905193516.846647-1-jiebin.sun@intel.com>
[not found] ` <20220905193516.846647-3-jiebin.sun@intel.com>
2022-09-05 19:31 ` [PATCH v2 1/2] percpu: Add percpu_counter_add_local Shakeel Butt
2022-09-06 8:41 ` Sun, Jiebin
2022-09-05 19:35 ` [PATCH v2 2/2] ipc/msg: mitigate the lock contention with percpu counter Jiebin Sun
2022-09-06 16:54 ` [PATCH v3 0/2] ipc/msg: mitigate the lock contention in ipc/msg Jiebin Sun
2022-09-06 16:54 ` [PATCH v3 2/2] ipc/msg: mitigate the lock contention with percpu counter Jiebin Sun
2022-09-09 20:36 ` [PATCH v5 0/2] ipc/msg: mitigate the lock contention in ipc/msg Jiebin Sun
2022-09-09 20:36 ` [PATCH v5 1/2] percpu: Add percpu_counter_add_local and percpu_counter_sub_local Jiebin Sun
2022-09-09 16:37 ` Tim Chen
2022-09-10 1:37 ` kernel test robot [this message]
2022-09-10 8:15 ` kernel test robot
2022-09-10 8:26 ` kernel test robot
2022-09-09 20:36 ` [PATCH v5 2/2] ipc/msg: mitigate the lock contention with percpu counter Jiebin Sun
2022-09-09 16:11 ` Tim Chen
2022-09-13 19:25 ` [PATCH v6 0/2] ipc/msg: mitigate the lock contention in ipc/msg Jiebin Sun
2022-09-13 19:25 ` [PATCH v6 1/2] percpu: Add percpu_counter_add_local and percpu_counter_sub_local Jiebin Sun
2022-09-18 11:08 ` Manfred Spraul
2022-09-20 6:01 ` Sun, Jiebin
2022-09-13 19:25 ` [PATCH v6 2/2] ipc/msg: mitigate the lock contention with percpu counter Jiebin Sun
2022-09-18 12:53 ` Manfred Spraul
2022-09-20 2:36 ` Sun, Jiebin
2022-09-20 4:53 ` Manfred Spraul
2022-09-20 5:50 ` Sun, Jiebin
2022-09-20 15:08 ` [PATCH] ipc/msg: avoid negative value by overflow in msginfo Jiebin Sun
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=202209100911.HBo9ZqIU-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.mikhalitsyn@virtuozzo.com \
--cc=cl@linux.com \
--cc=dennis@kernel.org \
--cc=ebiederm@xmission.com \
--cc=feng.tang@intel.com \
--cc=jiebin.sun@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=manfred@colorfullife.com \
--cc=shakeelb@google.com \
--cc=tianyou.li@intel.com \
--cc=tim.c.chen@intel.com \
--cc=tj@kernel.org \
--cc=vasily.averin@linux.dev \
--cc=wangyang.guo@intel.com \
--cc=ying.huang@intel.com \
/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