lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0a1f683-f5c5-cd95-a586-28cc1da9fc3d@arm.com>
Date:   Thu, 19 Mar 2020 11:30:08 +0100
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     Valentin Schneider <valentin.schneider@....com>,
        linux-kernel@...r.kernel.org
Cc:     mingo@...nel.org, peterz@...radead.org, vincent.guittot@...aro.org
Subject: Re: [PATCH v2 8/9] sched/fair: Split select_task_rq_fair want_affine
 logic

On 11.03.20 19:16, Valentin Schneider wrote:

[...]

> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index f98dac0c7f82..a6fca6817e92 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6620,26 +6620,33 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
>  	}
>  
>  	rcu_read_lock();
> +
> +	sd = highest_flag_domain(cpu, sd_flag);
> +
> +	/*
> +	 * If !want_affine, we just look for the highest domain where
> +	 * sd_flag is set.
> +	 */
> +	if (!want_affine)
> +		goto scan;
> +
> +	/*
> +	 * Otherwise we look for the lowest domain with SD_WAKE_AFFINE and that
> +	 * spans both 'cpu' and 'prev_cpu'.
> +	 */
>  	for_each_domain(cpu, tmp) {
> -		/*
> -		 * If both 'cpu' and 'prev_cpu' are part of this domain,
> -		 * cpu is a valid SD_WAKE_AFFINE target.
> -		 */
> -		if (want_affine && (tmp->flags & SD_WAKE_AFFINE) &&
> +		if ((tmp->flags & SD_WAKE_AFFINE) &&
>  		    cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) {
>  			if (cpu != prev_cpu)
>  				new_cpu = wake_affine(tmp, p, cpu, prev_cpu, sync);
>  
> -			sd = NULL; /* Prefer wake_affine over balance flags */
> +			/* Prefer wake_affine over SD lookup */

I assume that 'balance flags' stands for (wakeup) load balance, i.e.
find_idlest_xxx() path. So why change it?


[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ