srcu: Remove unused vmlinux srcu linker entries
PATCH v2 1/1 srcu: Remove unused vmlinux srcu linker entries
The SRCU for modules optimization (commit title "srcu: Allocate per-CPU data for DEFINE_SRCU() in modules") introduced vmlinux linker entries which is unused since it applies only to the built-in vmlinux. So remove it to prevent any space usage due to the 8 byte alignment it added. vmlinux.lds.h has no effect on module loading and is not used for building the module object, so the changes were not needed in the first place since the optimization is specific to modules.
Tested with SRCU torture_type and rcutorture. Put prints in module loader to confirm it is able to find and initialize the srcu structures.
---v1->v2: Added more context to change log.
include/asm-generic/vmlinux.lds.h | 4 ---- 1 file changed, 4 deletions(-)
include/asm-generic/vmlinux.lds.h +0 -4
@@ -338,10 +338,6 @@ KEEP(*(__tracepoints_ptrs)) /* Tracepoints: pointer array */ \ __stop___tracepoints_ptrs = .; \ *(__tracepoints_strings)/* Tracepoints: strings */ \ - . = ALIGN(8); \ - __start___srcu_struct = .; \ - *(___srcu_struct_ptrs ) \ - __end___srcu_struct = .; \ } \ \ .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
Paul E. McKenney
AppliedQuoted 11 lines · Joel Fernandes (Google)
The SRCU for modules optimization (commit title "srcu: Allocate per-CPU data for
DEFINE_SRCU()in modules") introduced vmlinux linker entries which is unused since it applies only to the built-in vmlinux. So remove it to prevent any space usage due to the 8 byte alignment it added.vmlinux.lds.hhas no effect on module loading and is not used for building the module object, so the changes were not needed in the first place since the optimization is specific to modules.Tested with SRCU
torture_typeand rcutorture. Put prints in module loader to confirm it is able to find and initialize the srcu structures.
Quoted 7 lines
Cc Josh Triplett <[email protected]>Cc Steven Rostedt <[email protected]>Cc Mathieu Desnoyers <[email protected]>Cc Lai Jiangshan <[email protected]>Signed-off-by Joel Fernandes (Google) <[email protected]>
Queued, thank you, Joel!
Thanx, Paul
Quoted 24 lines
---
v1->v2: Added more context to change log.include/asm-generic/vmlinux.lds.h | 4 ---- 1 file changed, 4 deletions(-)include/asm-generic/vmlinux.lds.h +0
-4@@ -338,10 +338,6 @@ KEEP(*(__tracepoints_ptrs)) /* Tracepoints: pointer array */ \ __stop___tracepoints_ptrs = .; \ *(__tracepoints_strings)/* Tracepoints: strings */ \ - . = ALIGN(8); \ - __start___srcu_struct = .; \ - *(___srcu_struct_ptrs ) \ - __end___srcu_struct = .; \ } \ \ .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \Signature · 1 line
2.21.0.392.gf8f6787159e-goog