Re: [RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq

2020-11-19 Thread Yafang Shao
On Thu, Nov 19, 2020 at 3:45 PM Mel Gorman wrote: > > On Thu, Nov 19, 2020 at 11:52:28AM +0800, Yafang Shao wrote: > > The 'cfs_rq' in these helpers is only used to get the rq_clock, so we > > can pass the rq_clock directly. After that, these helpers can be used by > > all sched class. > > > > Sig

Re: [RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq

2020-11-18 Thread Mel Gorman
On Thu, Nov 19, 2020 at 11:52:28AM +0800, Yafang Shao wrote: > The 'cfs_rq' in these helpers is only used to get the rq_clock, so we > can pass the rq_clock directly. After that, these helpers can be used by > all sched class. > > Signed-off-by: Yafang Shao This introduces overhead in the genera

[RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq

2020-11-18 Thread Yafang Shao
The 'cfs_rq' in these helpers is only used to get the rq_clock, so we can pass the rq_clock directly. After that, these helpers can be used by all sched class. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 148 ++- kernel/sched/stats.c | 134 ++