On 03/30/2017 09:04 AM, Peter Zijlstra wrote:
On Wed, Mar 29, 2017 at 11:03:45PM +0200, Dietmar Eggemann wrote:
[...]
Why not reduce the parameter list of these 3 incarnations to 'now, cpu,
object'?
static int
__update_load_avg_blocked_se(u64 now, int cpu, struct sched_entity *se)
static int
__update_load_avg_se(u64 now, int cpu, struct sched_entity *se)
static int
__update_load_avg_cfs_rq(u64 now, int cpu, struct cfs_rq *cfs_rq)
[...]
doesn't quite work with se, but yes good idea.
Ah, OK, you don't like to use 'cfs_rq_of(se)->curr == se' in
__update_load_avg_se(). The reason is that it's already fetched in
update_load_avg()?
And this way we don't need the nonnull attribute either, because it
should be clear from having dereferenced it that it cannot be null.
Yes, this would be clearer now.
[...]