lkml.org 
[lkml]   [2020]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/3] Remove sched_trace_*() helper functions
Date
The patch ("sched/debug: Add new tracepoint to track cpu_capacity")
https://lkml.kernel.org/r/1598605249-72651-1-git-send-email-vincent.donnefort@arm.com
revealed the issue that with every tracepoint in the scheduler code
there are sched_trace_*() helper functions in fair.c appearing which
are exported via include/linux/sched.h.

Those tracepoints can be used to build tracepoint-to traceevent
(tp-2-te) converters.

The sched_trace_*() helper functions provide access to data of
internal scheduler structures, like struct rq. They support built-in
or kernel module builds outside kernel/sched/. But they don't have to
be maintained in the scheduler code.

kernel/sched/ is the natural place for a tp-2-te converter to get
access to data of internal scheduler structures.

In case a tp-2-te converter has to be build outside the kernel code
tree there is an easy way to make kernel/sched/sched.h visible.
See header of "sched/fair: Remove sched_trace_*() helper functions" for
details.

The first patch removes those sched_trace_*() helper functions from
the scheduler.

The second patch removes cfs_rq_tg_path() from the scheduler since it
can be coded inside a tp-2-te converter as well.

The third patch allows to use autogroup_path() from within a tp-2-te
converter (i.e. from cfs_rq_tg_path()) in kernel modules builds.

The aim of tracepoints in the scheduler code is to keep the footprint of
traceing code as small as possible and to not guarantee any stable ABI
in relation to internal scheduler structures.

Dietmar Eggemann (3):
sched/fair: Remove sched_trace_*() helper functions
sched/fair: Remove cfs_rq_tg_path()
sched/autogroup: Change autogroup_path() into a static inline function

include/linux/sched.h | 13 -----
kernel/sched/autogroup.c | 8 ---
kernel/sched/autogroup.h | 8 ++-
kernel/sched/fair.c | 105 ---------------------------------------
kernel/sched/sched.h | 3 --
5 files changed, 7 insertions(+), 130 deletions(-)

--
2.17.1

\
 
 \ /
  Last update: 2020-09-07 11:19    [W:0.035 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site