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]
Message-ID: <865702ea-b1c1-e39d-94ea-d55bf03b86db@linux.intel.com>
Date:   Fri, 17 Sep 2021 17:11:11 +0800
From:   Aubrey Li <aubrey.li@...ux.intel.com>
To:     Barry Song <21cnbao@...il.com>
Cc:     linux-kernel@...r.kernel.org, mgorman@...hsingularity.net,
        mingo@...nel.org, peterz@...radead.org, song.bao.hua@...ilicon.com,
        valentin.schneider@....com, vincent.guittot@...aro.org,
        yangyicong@...wei.com
Subject: Re: [PATCH 8/9] sched/fair: select idle cpu from idle cpumask for
 task wakeup

On 9/17/21 12:15 PM, Barry Song wrote:
>> @@ -4965,6 +4965,7 @@ void scheduler_tick(void)
>>
>>  #ifdef CONFIG_SMP
>> 	rq->idle_balance = idle_cpu(cpu);
>> +	update_idle_cpumask(cpu, rq->idle_balance);
>>  	trigger_load_balance(rq);
>>  #endif
>> }
> 
> might be stupid, a question bothering yicong and me is that why don't we
> choose to update_idle_cpumask() while idle task exits and switches to a
> normal task?

I implemented that way and we discussed before(RFC v1 ?), updating a cpumask
at every enter/exit idle is more expensive than we expected, though it's
per LLC domain, Vincent saw a significant regression IIRC. You can also
take a look at nohz.idle_cpus_mask as a reference.

> for example, before tick comes, cpu has exited from idle, but we are only
> able to update it in tick. this makes idle_cpus_span inaccurate, thus we
> will scan cpu which isn't actually idle in select_idle_sibling.
> is it because of the huge update overhead?
> 

Yes, we'll have false positive but we don't miss true positive. So things
won't be worse than the current way.

Thanks,
-Aubrey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ