Re: [PATCH 4/6] sched: make schedstats helpers independent of fair sched class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mgorman@xxxxxxx>
> Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>

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 <mgorman@xxxxxxx>

I didn't look at the rt.c parts

-- 
Mel Gorman
SUSE Labs



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux