Skip to content

RFC Add kernel-offset file and make rcu_read_[un]lock() included

Lai Jiangshan lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 56 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Move task's RCU code to rcupdate.hinclude/linux/init_task.h include/linux/rcupdate.h include/linux/sched.h +2 more+102 -932 replies
2/5kbuild: dedumplicated the generating codeKbuild+21 -392 replies
3/5kbuild: add kernel-offset fileKbuild kernel/kernel-offsets.c+46 -91 reply
4/5RCU: Add TASK_RCU_OFFSETinclude/linux/rcupdate.h kernel/kernel-offsets.c+47 -555 replies
5/5RCU: declare preemptible __rcu_read_[un]lock() as inline functioninclude/linux/rcupdate.h kernel/rcutiny_plugin.h kernel/rcutree_plugin.h+39 -740 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchLai JiangshanPaul E. McKenney
1/5
2/5
3/5
4/5A-b Not-signed-off-by Not-signed-off-by
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/5] Add kernel-offset file and make rcu_read_[un]lock() included

__rcu_read_[un]lock() are so simple functions and called so frequent, it is not good that a function call overhead is required when use them. It would be better if we declare them inline and let the compiler do the choice.

We add kernel-offset.c for TASK_RCU_OFFSET, which enable we declare rcu_read_[un]lock() as inline function.

Adding kernel-offset.c does not have any effect for the result compiled kernel, it just adds a small and fast step in the kbuid stage.

Lai Jiangshan (5):
task_rcu_struct
kbuild_dedumplicated
add_kernel_offset
access task's task_rcu_struct without include sched.h rcu inline

 Kbuild                    |   99 ++++++++++++++++---------------
 include/linux/init_task.h |   25 +--------
 include/linux/rcupdate.h  |  144 ++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/sched.h     |   39 +------------
 kernel/kernel-offsets.c   |   17 +++++
 kernel/rcutiny_plugin.h   |   58 ++++--------------
 kernel/rcutree_plugin.h   |   69 ++++++----------------
 7 files changed, 243 insertions(+), 208 deletions(-)
 create mode 100644 kernel/kernel-offsets.c
Signature · 1 line
1.7.4