Re: [PATCH 2/6] cpufreq: schedutil: ignore the sugov kthread for frequencies selections

From: Steven Rostedt
Date: Mon Mar 06 2017 - 09:36:15 EST


On Thu, 2 Mar 2017 15:45:03 +0000
Patrick Bellasi <patrick.bellasi@xxxxxxx> wrote:

> @@ -287,6 +289,10 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,
> goto done;
> }
>
> + /* Skip updates generated by sugov kthreads */
> + if (curr == sg_policy->thread)

I think you want to put in an "unlikely()" around that statement. I'm
assuming you don't care about he performance of scheduling in the sugov
thread. At least tell gcc to optimize for the false path.

-- Steve

> + goto done;
> +
> sg_cpu->util = util;
> sg_cpu->max = max;
> sg_cpu->flags = flags;