On Tue, May 07, 2019 at 03:13:40PM +0100, Quentin Perret wrote: > On Monday 06 May 2019 at 06:48:33 (+0200), Luca Abeni wrote: > > @@ -1591,6 +1626,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int > > sd_flag, int flags) > > > > rcu_read_lock(); > > curr = READ_ONCE(rq->curr); /* unlocked access */ > > + het = static_branch_unlikely(&sched_asym_cpucapacity); > > Nit: not sure how the generated code looks like but I wonder if this > could potentially make you loose the benefit of the static key ?
I have to take the blame for this bit :-) I would be surprised the static_key gives us anything here, but that is actually not the point here. It is purely to know whether we have to be capacity aware or not. I don't think we are in a critical path and the variable providing the necessary condition just happened to be a static_key. We might be able to make better use of it if we refactor the code a bit. Morten