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-next>] [day] [month] [year] [list]
Message-Id: <d4c936d9-c99f-e50d-95c9-0732ae45d1b9@linux.ibm.com>
Date:   Wed, 9 Oct 2019 14:52:54 +0530
From:   Parth Shah <parth@...ux.ibm.com>
To:     Hillf Danton <hdanton@...a.com>
Cc:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        peterz@...radead.org, mingo@...hat.com, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, patrick.bellasi@...bug.net,
        valentin.schneider@....com, pavel@....cz, dsmythies@...us.net,
        Quentin Perret <qperret@...rret.net>,
        rafael.j.wysocki@...el.com, tim.c.chen@...ux.intel.com,
        daniel.lezcano@...aro.org
Subject: Re: [RFC v5 4/6] sched/fair: Tune task wake-up logic to pack small
 background tasks on fewer cores



On 10/8/19 6:58 PM, Hillf Danton wrote:
> 
> On Mon,  7 Oct 2019 14:00:49 +0530 Parth Shah wrote:
>> +/*
>> + * Try to find a non idle core in the system  based on few heuristics:
>> + * - Keep track of overutilized (>80% util) and busy (>12.5% util) CPUs
>> + * - If none CPUs are busy then do not select the core for task packing
>> + * - If atleast one CPU is busy then do task packing unless overutilized CPUs
>> + *   count is < busy/2 CPU count
>> + * - Always select idle CPU for task packing
>> + */
>> +static int select_non_idle_core(struct task_struct *p, int prev_cpu, int target)
>> +{
>> +	struct cpumask *cpus = this_cpu_cpumask_var_ptr(turbo_sched_mask);
>> +	int iter_cpu, sibling;
>> +
>> +	cpumask_and(cpus, cpu_online_mask, p->cpus_ptr);
>> +
>> +	for_each_cpu_wrap(iter_cpu, cpus, prev_cpu) {
>> +		int idle_cpu_count = 0, non_idle_cpu_count = 0;
>> +		int overutil_cpu_count = 0;
>> +		int busy_cpu_count = 0;
>> +		int best_cpu = iter_cpu;
>> +
>> +		for_each_cpu(sibling, cpu_smt_mask(iter_cpu)) {
>> +			__cpumask_clear_cpu(sibling, cpus);
>> +			if (idle_cpu(iter_cpu)) {
> 
> Would you please elaborate the reasons that the iter cpu is checked idle
> more than once for finding a busy core?
> 

Thanks for looking at the patches.
Could you please point me out where iter_cpu is checked more than once?

>> +				idle_cpu_count++;
>> +				best_cpu = iter_cpu;
>> +			} else {
>> +				non_idle_cpu_count++;
>> +				if (cpu_overutilized(iter_cpu))
>> +					overutil_cpu_count++;
>> +				if (is_cpu_busy(cpu_util(iter_cpu)))
>> +					busy_cpu_count++;
>> +			}
>> +		}
>> +
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ