On Tue, Dec 01, 2020 at 07:54:14PM +0800, Yafang Shao wrote: > The original prototype of the schedstats helpers are > > update_stats_wait_*(struct cfs_rq *cfs_rq, struct sched_entity *se) > > The cfs_rq in these helpers is used to get the rq_clock, and the se is > used to get the struct sched_statistics and the struct task_struct. In > order to make these helpers available by all sched classes, we can pass > the rq, sched_statistics and task_struct directly. > > Then the new helpers are > > update_stats_wait_*(struct rq *rq, struct task_struct *p, > struct sched_statistics *stats) > > which are independent of fair sched class. > > To avoid vmlinux growing too large or introducing ovehead when > !schedstat_enabled(), some new helpers after schedstat_enabled() are also > introduced, Suggested by Mel. These helpers are in sched/stats.c, > > __update_stats_wait_*(struct rq *rq, struct task_struct *p, > struct sched_statistics *stats) > > Cc: Mel Gorman <mgor...@suse.de> > Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
Think it's ok, it's mostly code shuffling. I'd have been happier if there was evidence showing a before/after comparison of the sched stats for something simple like "perf bench sched pipe" and a clear statement of no functional change as well as a comparison of the vmlinux files but I think it's ok so; Acked-by: Mel Gorman <mgor...@suse.de> I didn't look at the rt.c parts -- Mel Gorman SUSE Labs