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: Tue, 6 Feb 2024 15:24:55 +0000
From: Qais Yousef <qyousef@...alina.io>
To: Hillf Danton <hdanton@...a.com>
Cc: Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	linux-kernel@...r.kernel.org,
	Pierre Gondois <Pierre.Gondois@....com>
Subject: Re: [PATCH v5 2/2] sched/fair: Check a task has a fitting cpu when
 updating misfit

On 02/06/24 18:55, Hillf Danton wrote:

> > +/*
> > + * Check the max capacity the task is allowed to run at for misfit detection.
> > + */
> > +static void set_task_max_allowed_capacity(struct task_struct *p)
> > +{
> > +	struct asym_cap_data *entry;
> > +
> > +	if (!sched_asym_cpucap_active())
> > +		return;
> > +
> > +	rcu_read_lock();
> > +	list_for_each_entry_rcu(entry, &asym_cap_list, link) {
> > +		cpumask_t *cpumask;
> > +
> > +		cpumask = cpu_capacity_span(entry);
> > +		if (!cpumask_intersects(p->cpus_ptr, cpumask))
> > +			continue;
> > +
> > +		p->max_allowed_capacity = entry->capacity;
> > +		break;
> 
> Given what max_allowed_capacity could mean, it is needed to find the max
> capacity by iterating the asym_cap_list instead of the first capacity
> determined by the allowed CPU mask.

I don't think we can rely on that as there is no guarantee on the position of
the biggest CPU. We would have to iterate through every CPU in the mask instead
to figure out the one with the largest capacity. And we moved to this as
Vincent wasn't keen on assuming we have few CPUs and potentially not scaling on
systems with large number of CPUs. This list should be faster as the number of
capacity level is much smaller than the number of CPUs.

> > +	}
> > +	rcu_read_unlock();
> > +}
> 
> BTW is it working in case of systems with a super core?
> 
> 	cpu0-3	cpu4-6	cpu7
> 	little	big	super
> 	core	core	core

It should. Super here should have the capacity of 1024 and everything else
scaled relative to it like any other system with 3 tiers of capacities.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ