Re: [PATCH 4/4] rcu: Switch to using free() instead of kfree()

From: kbuild test robot
Date: Sat Mar 24 2018 - 03:08:33 EST


Hi Matthew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on rcu/rcu/next]
[also build test WARNING on v4.16-rc6 next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Matthew-Wilcox/Add-free-function/20180324-140756
base: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
config: x86_64-randconfig-x016-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:10:0,
from kernel/rcu/tree.c:31:
kernel/rcu/tree_plugin.h: In function '__call_rcu_nocb':
kernel/rcu/tree_plugin.h:2020:6: error: implicit declaration of function '__is_kfree_rcu_offset'; did you mean '__is_free_rcu_offset'? [-Werror=implicit-function-declaration]
if (__is_kfree_rcu_offset((unsigned long)rhp->func))
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> kernel/rcu/tree_plugin.h:2020:2: note: in expansion of macro 'if'
if (__is_kfree_rcu_offset((unsigned long)rhp->func))
^~
In file included from kernel/rcu/tree.c:4210:0:
kernel/rcu/tree_plugin.h:2021:3: error: implicit declaration of function 'trace_rcu_kfree_callback'; did you mean 'trace_rcu_free_callback'? [-Werror=implicit-function-declaration]
trace_rcu_kfree_callback(rdp->rsp->name, rhp,
^~~~~~~~~~~~~~~~~~~~~~~~
trace_rcu_free_callback
cc1: some warnings being treated as errors

vim +/if +2020 kernel/rcu/tree_plugin.h

3fbfbf7a3b kernel/rcutree_plugin.h Paul E. McKenney 2012-08-19 2016
d1e43fa5f8 kernel/rcutree_plugin.h Frederic Weisbecker 2013-03-26 2017 if (!rcu_is_nocb_cpu(rdp->cpu))
c271d3a957 kernel/rcu/tree_plugin.h Pranith Kumar 2014-07-08 2018 return false;
96d3fd0d31 kernel/rcu/tree_plugin.h Paul E. McKenney 2013-10-04 2019 __call_rcu_nocb_enqueue(rdp, rhp, &rhp->next, 1, lazy, flags);
21e7a60874 kernel/rcutree_plugin.h Paul E. McKenney 2013-02-09 @2020 if (__is_kfree_rcu_offset((unsigned long)rhp->func))
21e7a60874 kernel/rcutree_plugin.h Paul E. McKenney 2013-02-09 2021 trace_rcu_kfree_callback(rdp->rsp->name, rhp,
21e7a60874 kernel/rcutree_plugin.h Paul E. McKenney 2013-02-09 2022 (unsigned long)rhp->func,
756cbf6bef kernel/rcutree_plugin.h Paul E. McKenney 2013-08-15 2023 -atomic_long_read(&rdp->nocb_q_count_lazy),
756cbf6bef kernel/rcutree_plugin.h Paul E. McKenney 2013-08-15 2024 -atomic_long_read(&rdp->nocb_q_count));
21e7a60874 kernel/rcutree_plugin.h Paul E. McKenney 2013-02-09 2025 else
21e7a60874 kernel/rcutree_plugin.h Paul E. McKenney 2013-02-09 2026 trace_rcu_callback(rdp->rsp->name, rhp,
756cbf6bef kernel/rcutree_plugin.h Paul E. McKenney 2013-08-15 2027 -atomic_long_read(&rdp->nocb_q_count_lazy),
756cbf6bef kernel/rcutree_plugin.h Paul E. McKenney 2013-08-15 2028 -atomic_long_read(&rdp->nocb_q_count));
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2029
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2030 /*
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2031 * If called from an extended quiescent state with interrupts
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2032 * disabled, invoke the RCU core in order to allow the idle-entry
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2033 * deferred-wakeup check to function.
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2034 */
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2035 if (irqs_disabled_flags(flags) &&
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2036 !rcu_is_watching() &&
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2037 cpu_online(smp_processor_id()))
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2038 invoke_rcu_core();
1772947bd0 kernel/rcu/tree_plugin.h Paul E. McKenney 2014-08-12 2039
c271d3a957 kernel/rcu/tree_plugin.h Pranith Kumar 2014-07-08 2040 return true;
3fbfbf7a3b kernel/rcutree_plugin.h Paul E. McKenney 2012-08-19 2041 }
3fbfbf7a3b kernel/rcutree_plugin.h Paul E. McKenney 2012-08-19 2042

:::::: The code at line 2020 was first introduced by commit
:::::: 21e7a6087480451804124cee27c0a7d0a7de1564 rcu: Add event tracing for no-CBs CPUs' callback registration

:::::: TO: Paul E. McKenney <paul.mckenney@xxxxxxxxxx>
:::::: CC: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip