public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/5] Additional scheduling information in tracepoints
@ 2016-09-23 16:49 Julien Desfossez
  2016-09-23 16:49 ` [RFC PATCH v2 1/5] sched: get effective policy and rt_prio Julien Desfossez
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Julien Desfossez @ 2016-09-23 16:49 UTC (permalink / raw)
  To: peterz, tglx, rostedt, mingo, daolivei
  Cc: mathieu.desnoyers, linux-kernel, Julien Desfossez

This patchset is a proposal to extract more accurate scheduling information in
the kernel trace. The existing scheduling tracepoints currently expose the
"prio" field which is an internal detail of the kernel and is not enough to
understand the behaviour of the scheduler. In order to get more accurate
information, we need the nice value, rt_priority, the policy and deadline
parameters (period, runtime and deadline).

The problem is that adding all these fields to the existing tracepoints will
quickly bloat the traces, especially for users who do not need these fields.
Moreover, removing the "prio" field might break existing tools.

This patchset, proposes a way to connect new probes to existing tracepoints
with the introduction of the TRACE_EVENT_MAP macro so that the instrumented
code does not have to change and we can create alternative versions of the
existing tracepoints.

With this macro, we propose new versions of the sched_switch, sched_waking,
sched_process_fork and sched_pi_setprio tracepoint probes that contain more
scheduling information and get rid of the "prio" field. We also add the PI
information to these tracepoints, so if a process is currently boosted, we show
the name and PID of the top waiter. This allows to quickly see the blocking
chain even if some of the trace background is missing.

In addition, we also propose a new tracepoint (sched_update_prio) that is
called whenever the scheduling configuration of a process is explicitly
changed.

Changes from v1:
 - Add a cover letter
 - Fix the signed-off-by chain
 - Remove an effect-less fix that was proposed
 - Move the effective_policy/rt_prio helpers to sched/core.c
 - Reorder the patchset so that the new TP sched_update_prio is the last one

Julien Desfossez (5):
  sched: get effective policy and rt_prio
  tracing: add TRACE_EVENT_MAP
  tracing: extend scheduling tracepoints
  tracing: extend sched_pi_setprio
  tracing: add sched_update_prio

 include/linux/sched.h        |   2 +
 include/linux/trace_events.h |  14 +-
 include/linux/tracepoint.h   |  11 +-
 include/trace/define_trace.h |   4 +
 include/trace/events/sched.h | 386 +++++++++++++++++++++++++++++++++++++++++++
 include/trace/perf.h         |   7 +
 include/trace/trace_events.h |  50 ++++++
 kernel/sched/core.c          |  39 +++++
 kernel/trace/trace_events.c  |  15 +-
 9 files changed, 522 insertions(+), 6 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2016-09-26 19:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 16:49 [RFC PATCH v2 0/5] Additional scheduling information in tracepoints Julien Desfossez
2016-09-23 16:49 ` [RFC PATCH v2 1/5] sched: get effective policy and rt_prio Julien Desfossez
2016-09-23 16:49 ` [RFC PATCH v2 2/5] tracing: add TRACE_EVENT_MAP Julien Desfossez
2016-09-23 16:49 ` [RFC PATCH v2 3/5] tracing: extend scheduling tracepoints Julien Desfossez
2016-09-23 16:49 ` [RFC PATCH v2 4/5] tracing: extend sched_pi_setprio Julien Desfossez
2016-09-23 16:49 ` [RFC PATCH v2 5/5] tracing: add sched_update_prio Julien Desfossez
2016-09-24 13:28   ` Mathieu Desnoyers
2016-09-26 12:27 ` [RFC PATCH v2 0/5] Additional scheduling information in tracepoints Peter Zijlstra
2016-09-26 19:37   ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox