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]
Date:	Thu, 2 Jun 2016 16:21:05 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Morten Rasmussen <morten.rasmussen@....com>
Cc:	mingo@...hat.com, dietmar.eggemann@....com, yuyang.du@...el.com,
	vincent.guittot@...aro.org, mgalbraith@...e.de,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/16] sched/fair: Let asymmetric cpu configurations
 balance at wake-up

On Mon, May 23, 2016 at 11:58:51AM +0100, Morten Rasmussen wrote:
> Currently, SD_WAKE_AFFINE always takes priority over wakeup balancing if
> SD_BALANCE_WAKE is set on the sched_domains. For asymmetric
> configurations SD_WAKE_AFFINE is only desirable if the waking task's
> compute demand (utilization) is suitable for the cpu capacities
> available within the SD_WAKE_AFFINE sched_domain. If not, let wakeup
> balancing take over (find_idlest_{group, cpu}()).
> 
> The assumption is that SD_WAKE_AFFINE is never set for a sched_domain
> containing cpus with different capacities. This is enforced by a
> previous patch based on the SD_ASYM_CPUCAPACITY flag.
> 
> Ideally, we shouldn't set 'want_affine' in the first place, but we don't
> know if SD_BALANCE_WAKE is enabled on the sched_domain(s) until we start
> traversing them.

I'm a bit confused...

Lets assume a 2+2 big.little thing with shared LLC:


	---------- SD2 ----------

	-- SD1 --	-- SD1 --

	0	1	2	3


SD1: WAKE_AFFINE, BALANCE_WAKE
SD2: ASYM_CAPACITY, BALANCE_WAKE

t0 used to run on cpu1, t0 used to run on cpu2

cpu0 wakes t0:

  want_affine = 1
  SD1:
    WAKE_AFFINE
      cpumask_test_cpu(prev_cpu, sd_mask) == true
    affine_sd = SD1
    break;

  affine_sd != NULL -> affine-wakeup

cpu0 wakes t1:

  want_affine = 1
  SD1:
    WAKE_AFFINE
      cpumask_test_cpu(prev_cpu, sd_mask) == false
  SD2:
    BALANCE_WAKE
      sd = SD2

  affine_sd == NULL, sd == SD2 -> find_idlest_*()


All without this patch...

So what is this thing doing?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ