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] [day] [month] [year] [list]
Date:   Fri, 24 Jan 2020 12:59:05 +0000
From:   Quentin Perret <qperret@...gle.com>
To:     Valentin Schneider <valentin.schneider@....com>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        peterz@...radead.org, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, morten.rasmussen@....com,
        adharmap@...eaurora.org
Subject: Re: [PATCH 1/3] sched/fair: Add asymmetric CPU capacity wakeup scan

Hey Valentin,

On Friday 24 Jan 2020 at 12:42:53 (+0000), Valentin Schneider wrote:
> +/*
> + * Scan the asym_capacity domain for idle CPUs; pick the first idle one on which
> + * the task fits.
> + */
> +static int select_idle_capacity(struct task_struct *p, int target)
> +{
> +	struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_idle_mask);
> +	struct sched_domain *sd;
> +	int cpu;
> +
> +	if (!static_branch_unlikely(&sched_asym_cpucapacity))
> +		return -1;
> +
> +	sd = rcu_dereference(per_cpu(sd_asym_cpucapacity, target));
> +	if (!sd)
> +		return -1;
> +

You might want 'sync_entity_load_avg(&p->se)' here no ?
find_idlest_cpu() and wake_cap() need one, but since we're going to use
them, you'll want to sync here too I think.


> +	cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
> +
> +	for_each_cpu_wrap(cpu, cpus, target) {
> +		if (!available_idle_cpu(cpu))
> +			continue;
> +		if (!task_fits_capacity(p, capacity_of(cpu)))
> +			continue;
> +
> +		return cpu;
> +	}

If we found an idle CPU, but not one big enough, should we still go
ahead and choose it ? Misfit / idle balance will fix that later when a
big CPU does become available.

> +
> +	return -1;
> +}
> +

Thanks,
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ