linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] Unload linux/kernel.h
@ 2025-12-25 17:09 Yury Norov (NVIDIA)
  2025-12-25 17:09 ` [PATCH v4 1/7] kernel.h: drop STACK_MAGIC macro Yury Norov (NVIDIA)
                   ` (6 more replies)
  0 siblings, 7 replies; 41+ messages in thread
From: Yury Norov (NVIDIA) @ 2025-12-25 17:09 UTC (permalink / raw)
  To: Steven Rostedt, Andrew Morton, Masami Hiramatsu,
	Mathieu Desnoyers, Andy Shevchenko, Christophe Leroy,
	Randy Dunlap, Ingo Molnar, Jani Nikula, Joonas Lahtinen,
	David Laight, Petr Pavlu, Andi Shyti, Rodrigo Vivi,
	Tvrtko Ursulin, Daniel Gomez, Greg Kroah-Hartman,
	Rafael J. Wysocki, Danilo Krummrich, linux-kernel, intel-gfx,
	dri-devel, linux-modules, linux-trace-kernel
  Cc: Yury Norov (NVIDIA)

kernel.h hosts declarations that can be placed better. This series
decouples kernel.h with some explicit and implicit dependencies; also,
moves tracing functionality to a new independent header.

My local build testing shows ~2% performance improvement for GCC + 
Ubuntu x86_64/localyesconfig.

v1: https://lore.kernel.org/all/20251129195304.204082-1-yury.norov@gmail.com/
v2: https://lore.kernel.org/all/20251203162329.280182-1-yury.norov@gmail.com/
v3: https://lore.kernel.org/all/20251205175237.242022-1-yury.norov@gmail.com/
v4: 
 - drop kernel.h dependency on linux/instruction_pointer.h (new patch #4);
 - drop trace_printk.h dependency on string.h (new patch #5 - Steven);
 - drop kernel.h dependency on trace_printk.h (new patch #7); 
 - explicitly tested CONFIG_FORTIFY x86_64 build with no issues.

0-DAY CI Kernel Test Service:
alpha                             allnoconfig    gcc-15.1.0
alpha                            allyesconfig    gcc-15.1.0
alpha                               defconfig    gcc-15.1.0
arc                              allmodconfig    clang-16
arc                              allmodconfig    gcc-15.1.0
arc                               allnoconfig    gcc-15.1.0
arc                              allyesconfig    clang-22
arc                              allyesconfig    gcc-15.1.0
arc                                 defconfig    gcc-15.1.0
arc                   randconfig-001-20251225    gcc-11.5.0
arc                   randconfig-002-20251225    gcc-11.5.0
arm                               allnoconfig    clang-22
arm                               allnoconfig    gcc-15.1.0
arm                              allyesconfig    clang-16
arm                              allyesconfig    gcc-15.1.0
arm                                 defconfig    gcc-15.1.0
arm                          exynos_defconfig    gcc-15.1.0
arm                   randconfig-001-20251225    gcc-11.5.0
arm                   randconfig-002-20251225    gcc-11.5.0
arm                   randconfig-003-20251225    gcc-11.5.0
arm                   randconfig-004-20251225    gcc-11.5.0
arm                           spitz_defconfig    gcc-15.1.0
arm64                            allmodconfig    clang-19
arm64                            allmodconfig    clang-22
arm64                             allnoconfig    gcc-15.1.0
arm64                               defconfig    gcc-15.1.0
arm64                 randconfig-001-20251225    clang-18
arm64                 randconfig-001-20251225    gcc-11.5.0
arm64                 randconfig-002-20251225    gcc-11.5.0
arm64                 randconfig-002-20251225    gcc-12.5.0
arm64                 randconfig-003-20251225    clang-22
arm64                 randconfig-003-20251225    gcc-11.5.0
arm64                 randconfig-004-20251225    clang-22
arm64                 randconfig-004-20251225    gcc-11.5.0
csky                             allmodconfig    gcc-15.1.0
csky                              allnoconfig    gcc-15.1.0
csky                                defconfig    gcc-15.1.0
csky                  randconfig-001-20251225    gcc-11.5.0
csky                  randconfig-001-20251225    gcc-15.1.0
csky                  randconfig-002-20251225    gcc-11.5.0
hexagon                          allmodconfig    clang-17
hexagon                          allmodconfig    gcc-15.1.0
hexagon                           allnoconfig    clang-22
hexagon                           allnoconfig    gcc-15.1.0
hexagon                             defconfig    gcc-15.1.0
hexagon               randconfig-001-20251225    clang-22
hexagon               randconfig-002-20251225    clang-22
i386                             allmodconfig    clang-20
i386                             allmodconfig    gcc-14
i386                              allnoconfig    gcc-14
i386                              allnoconfig    gcc-15.1.0
i386                             allyesconfig    clang-20
i386                             allyesconfig    gcc-14
i386        buildonly-randconfig-001-20251225    clang-20
i386        buildonly-randconfig-002-20251225    clang-20
i386        buildonly-randconfig-003-20251225    clang-20
i386        buildonly-randconfig-003-20251225    gcc-14
i386        buildonly-randconfig-004-20251225    clang-20
i386        buildonly-randconfig-005-20251225    clang-20
i386        buildonly-randconfig-006-20251225    clang-20
i386                  randconfig-007-20251225    clang-20
i386                  randconfig-011-20251225    clang-20
i386                  randconfig-011-20251225    gcc-14
i386                  randconfig-012-20251225    gcc-14
i386                  randconfig-013-20251225    gcc-14
i386                  randconfig-014-20251225    clang-20
i386                  randconfig-014-20251225    gcc-14
i386                  randconfig-015-20251225    gcc-14
i386                  randconfig-016-20251225    clang-20
i386                  randconfig-016-20251225    gcc-14
i386                  randconfig-017-20251225    clang-20
i386                  randconfig-017-20251225    gcc-14
loongarch                        allmodconfig    clang-19
loongarch                        allmodconfig    clang-22
loongarch                         allnoconfig    clang-22
loongarch                         allnoconfig    gcc-15.1.0
loongarch                           defconfig    clang-19
loongarch             randconfig-001-20251225    clang-22
loongarch             randconfig-002-20251225    clang-22
loongarch             randconfig-002-20251225    gcc-15.1.0
m68k                             allmodconfig    gcc-15.1.0
m68k                              allnoconfig    gcc-15.1.0
m68k                             allyesconfig    clang-16
m68k                             allyesconfig    gcc-15.1.0
m68k                                defconfig    clang-19
microblaze                        allnoconfig    gcc-15.1.0
microblaze                       allyesconfig    gcc-15.1.0
microblaze                          defconfig    clang-19
mips                             allmodconfig    gcc-15.1.0
mips                              allnoconfig    gcc-15.1.0
mips                             allyesconfig    gcc-15.1.0
mips                           gcw0_defconfig    gcc-15.1.0
nios2                            allmodconfig    clang-22
nios2                            allmodconfig    gcc-11.5.0
nios2                             allnoconfig    clang-22
nios2                             allnoconfig    gcc-11.5.0
nios2                               defconfig    clang-19
nios2                 randconfig-001-20251225    clang-22
nios2                 randconfig-001-20251225    gcc-9.5.0
nios2                 randconfig-002-20251225    clang-22
nios2                 randconfig-002-20251225    gcc-11.5.0
openrisc                         allmodconfig    clang-22
openrisc                         allmodconfig    gcc-15.1.0
openrisc                          allnoconfig    clang-22
openrisc                          allnoconfig    gcc-15.1.0
openrisc                            defconfig    gcc-15.1.0
parisc                           allmodconfig    gcc-15.1.0
parisc                            allnoconfig    clang-22
parisc                            allnoconfig    gcc-15.1.0
parisc                           allyesconfig    clang-19
parisc                           allyesconfig    gcc-15.1.0
parisc                              defconfig    gcc-15.1.0
parisc                randconfig-001-20251225    clang-22
parisc                randconfig-002-20251225    clang-22
parisc64                            defconfig    clang-19
powerpc                          allmodconfig    gcc-15.1.0
powerpc                           allnoconfig    clang-22
powerpc                           allnoconfig    gcc-15.1.0
powerpc                        cell_defconfig    gcc-15.1.0
powerpc                      pmac32_defconfig    gcc-15.1.0
powerpc               randconfig-001-20251225    clang-22
powerpc               randconfig-002-20251225    clang-22
powerpc64             randconfig-001-20251225    clang-22
powerpc64             randconfig-002-20251225    clang-22
riscv                            allmodconfig    clang-22
riscv                             allnoconfig    clang-22
riscv                             allnoconfig    gcc-15.1.0
riscv                            allyesconfig    clang-16
riscv                               defconfig    clang-22
riscv                               defconfig    gcc-15.1.0
riscv                 randconfig-001-20251225    clang-19
riscv                 randconfig-001-20251225    clang-22
riscv                 randconfig-002-20251225    clang-19
riscv                 randconfig-002-20251225    gcc-11.5.0
s390                             allmodconfig    clang-18
s390                             allmodconfig    clang-19
s390                              allnoconfig    clang-22
s390                             allyesconfig    gcc-15.1.0
s390                                defconfig    clang-22
s390                                defconfig    gcc-15.1.0
s390                  randconfig-001-20251225    clang-19
s390                  randconfig-001-20251225    gcc-14.3.0
s390                  randconfig-002-20251225    clang-19
sh                               allmodconfig    gcc-15.1.0
sh                                allnoconfig    clang-22
sh                                allnoconfig    gcc-15.1.0
sh                               allyesconfig    clang-19
sh                               allyesconfig    gcc-15.1.0
sh                                  defconfig    gcc-14
sh                    randconfig-001-20251225    clang-19
sh                    randconfig-001-20251225    gcc-15.1.0
sh                    randconfig-002-20251225    clang-19
sh                    randconfig-002-20251225    gcc-9.5.0
sh                           se7724_defconfig    gcc-15.1.0
sparc                             allnoconfig    clang-22
sparc                             allnoconfig    gcc-15.1.0
sparc                               defconfig    gcc-15.1.0
sparc                 randconfig-001-20251225    gcc-13
sparc                 randconfig-002-20251225    gcc-13
sparc64                          allmodconfig    clang-22
sparc64                             defconfig    gcc-14
sparc64               randconfig-001-20251225    gcc-13
sparc64               randconfig-002-20251225    gcc-13
um                               allmodconfig    clang-19
um                                allnoconfig    clang-22
um                               allyesconfig    gcc-14
um                               allyesconfig    gcc-15.1.0
um                                  defconfig    gcc-14
um                             i386_defconfig    gcc-14
um                    randconfig-001-20251225    gcc-13
um                    randconfig-002-20251225    gcc-13
um                           x86_64_defconfig    gcc-14
x86_64                           allmodconfig    clang-20
x86_64                            allnoconfig    clang-20
x86_64                            allnoconfig    clang-22
x86_64                           allyesconfig    clang-20
x86_64      buildonly-randconfig-001-20251225    clang-20
x86_64      buildonly-randconfig-001-20251225    gcc-14
x86_64      buildonly-randconfig-002-20251225    clang-20
x86_64      buildonly-randconfig-002-20251225    gcc-14
x86_64      buildonly-randconfig-003-20251225    gcc-14
x86_64      buildonly-randconfig-004-20251225    clang-20
x86_64      buildonly-randconfig-004-20251225    gcc-14
x86_64      buildonly-randconfig-005-20251225    gcc-14
x86_64      buildonly-randconfig-006-20251225    clang-20
x86_64      buildonly-randconfig-006-20251225    gcc-14
x86_64                              defconfig    gcc-14
x86_64                                  kexec    clang-20
x86_64                randconfig-001-20251225    clang-20
x86_64                randconfig-002-20251225    clang-20
x86_64                randconfig-003-20251225    clang-20
x86_64                randconfig-004-20251225    clang-20
x86_64                randconfig-005-20251225    clang-20
x86_64                randconfig-006-20251225    clang-20
x86_64                randconfig-011-20251225    gcc-13
x86_64                randconfig-012-20251225    gcc-13
x86_64                randconfig-012-20251225    gcc-14
x86_64                randconfig-013-20251225    clang-20
x86_64                randconfig-013-20251225    gcc-13
x86_64                randconfig-014-20251225    clang-20
x86_64                randconfig-014-20251225    gcc-13
x86_64                randconfig-015-20251225    gcc-13
x86_64                randconfig-015-20251225    gcc-14
x86_64                randconfig-016-20251225    clang-20
x86_64                randconfig-016-20251225    gcc-13
x86_64                randconfig-071-20251225    clang-20
x86_64                randconfig-072-20251225    clang-20
x86_64                randconfig-073-20251225    clang-20
x86_64                randconfig-073-20251225    gcc-14
x86_64                randconfig-074-20251225    clang-20
x86_64                randconfig-075-20251225    clang-20
x86_64                randconfig-075-20251225    gcc-14
x86_64                randconfig-076-20251225    clang-20
x86_64                randconfig-076-20251225    gcc-14
x86_64                               rhel-9.4    clang-20
x86_64                           rhel-9.4-bpf    gcc-14
x86_64                          rhel-9.4-func    clang-20
x86_64                    rhel-9.4-kselftests    clang-20
x86_64                         rhel-9.4-kunit    gcc-14
x86_64                           rhel-9.4-ltp    gcc-14
x86_64                          rhel-9.4-rust    clang-20
xtensa                            allnoconfig    clang-22
xtensa                            allnoconfig    gcc-15.1.0
xtensa                           allyesconfig    clang-22
xtensa                randconfig-001-20251225    gcc-13
xtensa                randconfig-002-20251225    gcc-13

Merry Christmas everybody!

Steven Rostedt (1):
  tracing: Remove size parameter in __trace_puts()

Yury Norov (NVIDIA) (6):
  kernel.h: drop STACK_MAGIC macro
  moduleparam: include required headers explicitly
  kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h
  kernel.h: include linux/instruction_pointer.h explicitly
  tracing: move tracing declarations from kernel.h to a dedicated header
  kernel.h: drop trace_printk.h

 Documentation/filesystems/sysfs.rst           |   2 +-
 arch/powerpc/kvm/book3s_xics.c                |   1 +
 arch/powerpc/xmon/xmon.c                      |   1 +
 arch/s390/include/asm/processor.h             |   1 +
 arch/s390/kernel/ipl.c                        |   1 +
 arch/s390/kernel/machine_kexec.c              |   1 +
 drivers/gpu/drm/i915/gt/intel_gtt.h           |   1 +
 .../drm/i915/gt/selftest_ring_submission.c    |   1 +
 drivers/gpu/drm/i915/i915_gem.h               |   1 +
 drivers/gpu/drm/i915/i915_selftest.h          |   2 +
 drivers/hwtracing/stm/dummy_stm.c             |   1 +
 drivers/infiniband/hw/hfi1/trace_dbg.h        |   1 +
 drivers/tty/sysrq.c                           |   1 +
 drivers/usb/early/xhci-dbc.c                  |   1 +
 fs/ext4/inline.c                              |   1 +
 include/linux/kernel.h                        | 209 ------------------
 include/linux/moduleparam.h                   |   7 +-
 include/linux/sunrpc/debug.h                  |   1 +
 include/linux/sysfs.h                         |  13 ++
 include/linux/trace_printk.h                  | 204 +++++++++++++++++
 include/linux/ww_mutex.h                      |   1 +
 kernel/debug/debug_core.c                     |   1 +
 kernel/panic.c                                |   1 +
 kernel/rcu/rcu.h                              |   1 +
 kernel/rcu/rcutorture.c                       |   1 +
 kernel/trace/error_report-traces.c            |   1 +
 kernel/trace/ring_buffer_benchmark.c          |   1 +
 kernel/trace/trace.c                          |   8 +-
 kernel/trace/trace.h                          |   2 +-
 kernel/trace/trace_benchmark.c                |   1 +
 kernel/trace/trace_events_trigger.c           |   1 +
 kernel/trace/trace_functions.c                |   1 +
 kernel/trace/trace_printk.c                   |   1 +
 kernel/trace/trace_selftest.c                 |   1 +
 lib/sys_info.c                                |   1 +
 samples/fprobe/fprobe_example.c               |   1 +
 samples/ftrace/ftrace-direct-modify.c         |   1 +
 samples/ftrace/ftrace-direct-multi-modify.c   |   1 +
 samples/ftrace/ftrace-direct-multi.c          |   1 +
 samples/ftrace/ftrace-direct-too.c            |   1 +
 samples/ftrace/ftrace-direct.c                |   1 +
 samples/trace_printk/trace-printk.c           |   1 +
 sound/hda/common/sysfs.c                      |   1 +
 43 files changed, 266 insertions(+), 216 deletions(-)
 create mode 100644 include/linux/trace_printk.h

-- 
2.43.0


^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2026-01-05 20:15 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-25 17:09 [PATCH v4 0/7] Unload linux/kernel.h Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 1/7] kernel.h: drop STACK_MAGIC macro Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 2/7] moduleparam: include required headers explicitly Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 3/7] kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 4/7] kernel.h: include linux/instruction_pointer.h explicitly Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 5/7] tracing: Remove size parameter in __trace_puts() Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 6/7] tracing: move tracing declarations from kernel.h to a dedicated header Yury Norov (NVIDIA)
2025-12-25 17:09 ` [PATCH v4 7/7] kernel.h: drop trace_printk.h Yury Norov (NVIDIA)
2025-12-26 16:58   ` Steven Rostedt
2025-12-27 14:45     ` Andy Shevchenko
2025-12-27 15:57       ` Steven Rostedt
2025-12-27 19:35         ` Yury Norov
2025-12-27 21:27           ` Steven Rostedt
2025-12-28 21:31     ` Andrew Morton
2025-12-29 16:17       ` Steven Rostedt
2025-12-29 16:41         ` Danilo Krummrich
2025-12-29 17:19         ` Borislav Petkov
2025-12-29 22:25         ` Mathieu Desnoyers
2025-12-30  8:55           ` Andy Shevchenko
2025-12-30 14:21             ` Mathieu Desnoyers
2025-12-30 16:18               ` Yury Norov
2025-12-30 16:46                 ` Steven Rostedt
2026-01-03  0:50         ` Joel Fernandes
2026-01-03 12:57           ` Andy Shevchenko
2026-01-03 14:22             ` Yury Norov
2026-01-05  9:29               ` Jani Nikula
2026-01-05 16:36                 ` Yury Norov
2026-01-05 16:50                   ` Steven Rostedt
2026-01-05 18:30                   ` Jani Nikula
2026-01-03 15:36             ` Joel Fernandes
2026-01-04  0:20               ` Andy Shevchenko
2026-01-05 16:39                 ` Steven Rostedt
2026-01-05 17:11                   ` Joel Fernandes
2026-01-05 18:21                     ` Christophe Leroy (CS GROUP)
2026-01-05 19:33                       ` Joel Fernandes
2026-01-05 20:04                         ` Steven Rostedt
2026-01-05 20:15                           ` Joel Fernandes
2026-01-05 18:02                   ` Andy Shevchenko
2026-01-05 18:07                     ` Yury Norov
2026-01-05 18:11                       ` Andy Shevchenko
2025-12-27 14:50   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).