On Thu, Dec 21, 2017 at 12:19:47AM -0800, rao.shoaib@xxxxxxxxxx wrote:I left it out on purpose because the call in tiny is a little different
This patch moves kfree_call_rcu() and related macros out of rcu code. A newSomething you probably didn't know ... there are two RCU implementations
function __call_rcu_lazy() is created for calling __call_rcu() with the lazy
flag.
in the kernel; Tree and Tiny. It looks like you've only added
__call_rcu_lazy() to Tree and you'll also need to add it to Tiny.
Thanks. I was not sure if I was required to fix the noise or based on inspection the noise could be ignored. I will make the change and resubmit.
Also moving macros generated following checkpatch noise. I do not knowWhat checkpatch is warning you about here is that somebody might call
how to silence checkpatch as there is nothing wrong.
CHECK: Macro argument reuse 'offset' - possible side-effects?
#91: FILE: include/linux/slab.h:348:
+#define __kfree_rcu(head, offset) \
+ do { \
+ BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); \
+ kfree_call_rcu(head, (rcu_callback_t)(unsigned long)(offset)); \
+ } while (0)
__kfree_rcu(p, a++);
and this would expand into
do { \
BUILD_BUG_ON(!__is_kfree_rcu_offset(a++)); \
kfree_call_rcu(p, (rcu_callback_t)(unsigned long)(a++)); \
} while (0)
which would increment 'a' twice, and cause pain and suffering.
That's pretty unlikely usage of __kfree_rcu(), but I suppose it's not
impossible. We have various hacks to get around this kind of thing;
for example I might do this as::
#define __kfree_rcu(head, offset) \
do { \
unsigned long __o = offset;
BUILD_BUG_ON(!__is_kfree_rcu_offset(__o)); \
kfree_call_rcu(head, (rcu_callback_t)(unsigned long)(__o)); \
} while (0)
Now offset is only evaluated once per invocation of the macro. The other
two warnings are the same problem.