LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3 0/6] sched: Add new tracepoints required for EAS testing
@ 2019-06-04 11:14 Qais Yousef
  2019-06-04 11:14 ` [PATCH v3 1/6] sched: autogroup: Make autogroup_path() always available Qais Yousef
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Qais Yousef @ 2019-06-04 11:14 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Steven Rostedt
  Cc: linux-kernel, Pavankumar Kondeti, Sebastian Andrzej Siewior,
	Uwe Kleine-Konig, Dietmar Eggemann, Quentin Perret, Qais Yousef

Changes in v3:
	- Split pelt_rq TP into pelt_cfs, pelt_rq, pelt_dl and pelt_irq
	- Replace the fatty preprocessing wrappers with exported helper
	  functions to access data in unexported structures.
	- Remove the now unnecessary headers that were introduced in the
	  previous versions.
	- Postfix the tracepoints with '_tp' to make them standout more in the
	  code as bare tracepoints with no events associated.
	- Updated the example module in [2]
		- It demonstrates now how to convert the tracepoints into trace
		  events that extend the sched events subsystem in tracefs.

Changes in v2:
	- Add include guards to the newly added headers
	- Rename tracepoints:
		sched_load_rq -> pelt_rq
		sched_load_se -> pelt_se
	- Rename helper functions: s/sched_tp/sched_trace/
	- Make sched_trace*() less fat by reducing path size to 20 bytes from
	  64.
	- Fix compilation error when building on UP


The following patches add the bare minimum tracepoints required to perform EAS
testing in Lisa[1].

The new tracepoints are bare in a sense that they don't export any info in
tracefs, hence shouldn't introduce any ABI. The intended way to use them is by
loading a module that will probe the tracepoints and extract the info required
for userspace testing.

It is done in this way because adding new TRACE_EVENTS() is no longer accepted
AFAIU.

The tracepoints are focused around tracking PELT signals which is what EAS uses
to make its decision, hence knowing the value of PELT as it changes allows
verifying that EAS is doing the right thing based on synthetic tests that
simulate different scenarios.

Beside EAS, the new tracepoints can help investigate CFS load balancer and CFS
taskgroup handling as they are both based on PELT signals too.

Patch 1 exports autogroup_path function.

Patch 2 adds helper/accessor functions to extract info from unexported data
structures that are passed in the tracepoints. eg: access to sched_avg inside
cfs_rq.

Patches 3-5 add the new tracepoints.

Patch 6 exports the tracepoints so that out of tree modules can probe the new
tracepoints with least amount of effort - which extends the usefulness of the
tracepoints since creating a module to probe them is the only way to access
them.

An example module that uses these tracepoints is available in [2].

[1] https://github.com/ARM-software/lisa
[2] https://github.com/qais-yousef/tracepoints-helpers/tree/pelt-tps-v3-create-events/sched_tp


Qais Yousef (6):
  sched: autogroup: Make autogroup_path() always available
  sched: add a new sched_trace_*() helper functions
  sched: Add new tracepoints to track pelt at rq level
  sched: Add new tracepoint to track pelt at se level
  sched: Add sched_overutilized tracepoint
  sched: export the newly added tracepoints

 include/linux/sched.h        |  16 ++++-
 include/trace/events/sched.h |  31 ++++++++++
 kernel/sched/autogroup.c     |   2 -
 kernel/sched/core.c          |  11 ++++
 kernel/sched/fair.c          | 117 ++++++++++++++++++++++++++++++++++-
 kernel/sched/pelt.c          |  11 +++-
 6 files changed, 182 insertions(+), 6 deletions(-)

-- 
2.17.1


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

end of thread, back to index

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 11:14 [PATCH v3 0/6] sched: Add new tracepoints required for EAS testing Qais Yousef
2019-06-04 11:14 ` [PATCH v3 1/6] sched: autogroup: Make autogroup_path() always available Qais Yousef
2019-06-25  8:24   ` [tip:sched/core] sched/autogroup: " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 2/6] sched: add a new sched_trace_*() helper functions Qais Yousef
2019-06-25  8:25   ` [tip:sched/core] sched/debug: Add " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 3/6] sched: Add new tracepoints to track pelt at rq level Qais Yousef
2019-06-25  8:26   ` [tip:sched/core] sched/debug: Add new tracepoints to track PELT " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 4/6] sched: Add new tracepoint to track pelt at se level Qais Yousef
2019-06-25  8:27   ` [tip:sched/core] sched/debug: Add new tracepoint to track PELT " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 5/6] sched: Add sched_overutilized tracepoint Qais Yousef
2019-06-17 15:50   ` Peter Zijlstra
2019-06-17 16:31     ` Qais Yousef
2019-06-25  8:27   ` [tip:sched/core] sched/debug: " tip-bot for Qais Yousef
2019-06-04 11:14 ` [PATCH v3 6/6] sched: export the newly added tracepoints Qais Yousef
2019-06-25  8:28   ` [tip:sched/core] sched/debug: Export " tip-bot for Qais Yousef
2019-06-05  6:17 ` [PATCH v3 0/6] sched: Add new tracepoints required for EAS testing Christoph Hellwig
2019-06-05  7:22   ` Peter Zijlstra
2019-06-05 22:33   ` Qais Yousef
2019-06-17 12:51 ` Qais Yousef
2019-06-17 15:55   ` Peter Zijlstra
2019-06-17 16:22     ` Qais Yousef

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lore.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git