linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Remove sched_trace_*() helper functions
@ 2020-09-07  9:17 Dietmar Eggemann
  2020-09-07  9:17 ` [PATCH 1/3] sched/fair: " Dietmar Eggemann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dietmar Eggemann @ 2020-09-07  9:17 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: linux-kernel, Vincent Guittot, Steven Rostedt, Qais Yousef,
	Phil Auld, Vincent Donnefort

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


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

end of thread, other threads:[~2020-09-07  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07  9:17 [PATCH 0/3] Remove sched_trace_*() helper functions Dietmar Eggemann
2020-09-07  9:17 ` [PATCH 1/3] sched/fair: " Dietmar Eggemann
2020-09-07  9:17 ` [PATCH 2/3] sched/fair: Remove cfs_rq_tg_path() Dietmar Eggemann
2020-09-07  9:17 ` [PATCH 3/3] sched/autogroup: Change autogroup_path() into a static inline function Dietmar Eggemann

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).