Re: [PATCH 5/5] sched/fair: Add exception for hints in load balancing path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10 Sep 2022 16:23:26 +0530 K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
> - Load balancing considerations
> 
> If we have more tasks than the CPUs in the MC Domain, ignore the hint
> set by the user. This prevents losing the consolidation done at the
> wakeup time.

It is waste of time to cure ten pains with a pill in five days a week.

> @@ -7977,6 +7980,21 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
>  		return 0;
>  	}
>  
> +	/*
> +	 * Hints are followed only if the MC Domain is still ideal
> +	 * for the task.
> +	 */
> +	if (!env->ignore_hint) {
> +		/*
> +		 * Only consider the hints from the wakeup path to maintain
> +		 * data locality.
> +		 */
> +		if (READ_ONCE(p->hint) &
> +		    (PR_SCHED_HINT_WAKE_AFFINE | PR_SCHED_HINT_WAKE_HOLD))
> +			return 0;
> +	}

The wake hints are not honored during lb without PR_SCHED_HINT_IGNORE_LB set
then the scheduler works as you hint.

Hillf




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux