Re: [RFCv2 5/6] sched/fair: Tune task wake-up logic to pack jitter tasks

From: Peter Zijlstra
Date: Wed May 15 2019 - 12:44:56 EST


On Wed, May 15, 2019 at 07:23:21PM +0530, Parth Shah wrote:
> @@ -6704,6 +6773,31 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
> return -1;
> }
>
> +#ifdef CONFIG_SCHED_SMT
> +/*
> + * Select all tasks of type 1(jitter) for task packing
> + */
> +static int turbosched_select_idle_sibling(struct task_struct *p, int prev_cpu,
> + int target)
> +{
> + int new_cpu;
> +
> + if (unlikely(task_group(p)->turbo_sched_enabled)) {

So if you build without cgroups, this is a NULL dereference.

Also, this really should not be group based.

> + new_cpu = select_non_idle_core(p, prev_cpu);
> + if (new_cpu >= 0)
> + return new_cpu;
> + }
> +
> + return select_idle_sibling(p, prev_cpu, target);
> +}
> +#else