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:   Mon, 14 Sep 2020 11:31:42 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     "Li\, Aubrey" <aubrey.li@...ux.intel.com>
Cc:     Qais Yousef <qais.yousef@....com>, Aubrey Li <aubrey.li@...el.com>,
        mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        tim.c.chen@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 1/1] sched/fair: select idle cpu from idle cpumask in sched domain


On 12/09/20 00:04, Li, Aubrey wrote:
>>> +++ b/include/linux/sched/topology.h
>>> @@ -65,8 +65,21 @@ struct sched_domain_shared {
>>>     atomic_t	ref;
>>>     atomic_t	nr_busy_cpus;
>>>     int		has_idle_cores;
>>> +	/*
>>> +	 * Span of all idle CPUs in this domain.
>>> +	 *
>>> +	 * NOTE: this field is variable length. (Allocated dynamically
>>> +	 * by attaching extra space to the end of the structure,
>>> +	 * depending on how many CPUs the kernel has booted up with)
>>> +	 */
>>> +	unsigned long	idle_cpus_span[];
>>
>> Can't you use cpumask_var_t and zalloc_cpumask_var() instead?
>
> I can use the existing free code. Do we have a problem of this?
>

Nah, flexible array members are the preferred approach here; this also
means we don't let CONFIG_CPUMASK_OFFSTACK dictate where this gets
allocated.

See struct numa_group, struct sched_group, struct sched_domain, struct
em_perf_domain...

>>
>> The patch looks useful. Did it help you with any particular workload? It'd be
>> good to expand on that in the commit message.
>>
> Odd, that included in patch v1 0/1, did you receive it?
>
> Thanks,
> -Aubrey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ