linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] sched: support schedstat for RT sched class
@ 2020-11-19  3:52 Yafang Shao
  2020-11-19  3:52 ` [RFC PATCH 1/4] sched: define task_of() as a common helper Yafang Shao
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yafang Shao @ 2020-11-19  3:52 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot
  Cc: linux-kernel, linux-rt-users, Yafang Shao

We want to measure the latency of RT tasks in our production
environment with schedstat facility, but currently schedstat is only
supported for fair sched class. This patchset enable it for RT sched class
as well.

The schedstat statistics are defined in struct sched_entity, which is a
member of struct task_struct, so we can resue it for RT sched class.

The schedstat usage in RT sched class is similar with fair sched class,
for example,
		fair				RT
enqueue		update_stats_enqueue_fair	update_stats_enqueue_rt
dequeue		update_stats_dequeue_fair	update_stats_dequeue_rt
put_prev_task	update_stats_wait_start		update_stats_wait_start
set_next_task	update_stats_wait_end		update_stats_wait_end
show		/proc/[pid]/sched		/proc/[pid]/sched

The sched:sched_stats_* tracepoints can be used to trace RT tasks as
well after that patchset.

PATCH #1 ~ #3 are the preparation of PATCH #4.

Yafang Shao (4):
  sched: define task_of() as a common helper
  sched: make schedstats helpers not depend on cfs_rq
  sched: define update_stats_curr_start() as a common helper
  sched, rt: support schedstat for RT sched class

 kernel/sched/fair.c  | 173 ++-----------------------------------------
 kernel/sched/rt.c    |  63 +++++++++++++++-
 kernel/sched/sched.h |  23 ++++++
 kernel/sched/stats.c | 134 +++++++++++++++++++++++++++++++++
 kernel/sched/stats.h |  11 +++
 5 files changed, 236 insertions(+), 168 deletions(-)

-- 
2.18.4


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

end of thread, other threads:[~2020-11-21  4:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19  3:52 [RFC PATCH 0/4] sched: support schedstat for RT sched class Yafang Shao
2020-11-19  3:52 ` [RFC PATCH 1/4] sched: define task_of() as a common helper Yafang Shao
2020-11-19  3:52 ` [RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq Yafang Shao
2020-11-19  7:45   ` Mel Gorman
2020-11-19 11:24     ` Yafang Shao
2020-11-19  3:52 ` [RFC PATCH 3/4] sched: define update_stats_curr_start() as a common helper Yafang Shao
2020-11-19  3:52 ` [RFC PATCH 4/4] sched, rt: support schedstat for RT sched class Yafang Shao
2020-11-20  2:39   ` jun qian
2020-11-21  4:36     ` Yafang Shao

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