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, 07 Dec 2020 16:52:24 +0000
From:   Valentin Schneider <valentin.schneider@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Aubrey Li <aubrey.li@...ux.intel.com>, mingo@...hat.com,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        mgorman@...hsingularity.net, qais.yousef@....com,
        dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
        tim.c.chen@...ux.intel.com, linux-kernel@...r.kernel.org,
        Mel Gorman <mgorman@...e.de>, Jiang Biao <benbjiang@...il.com>
Subject: Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup


On 07/12/20 15:48, Peter Zijlstra wrote:
> On Wed, Nov 18, 2020 at 12:31:13PM +0800, Aubrey Li wrote:
>> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
>> index f324dc36fc43..6f5947673e66 100644
>> --- a/kernel/sched/idle.c
>> +++ b/kernel/sched/idle.c
>> @@ -163,6 +163,7 @@ static void cpuidle_idle_call(void)
>>       */
>>
>>      if (cpuidle_not_available(drv, dev)) {
>> +		update_idle_cpumask(this_rq(), true);
>>              tick_nohz_idle_stop_tick();
>>
>>              default_idle_call();
>> @@ -193,6 +194,7 @@ static void cpuidle_idle_call(void)
>>                      max_latency_ns = dev->forced_idle_latency_limit_ns;
>>              }
>>
>> +		update_idle_cpumask(this_rq(), true);
>>              tick_nohz_idle_stop_tick();
>>
>>              next_state = cpuidle_find_deepest_state(drv, dev, max_latency_ns);
>> @@ -205,10 +207,12 @@ static void cpuidle_idle_call(void)
>>               */
>>              next_state = cpuidle_select(drv, dev, &stop_tick);
>>
>> -		if (stop_tick || tick_nohz_tick_stopped())
>> +		if (stop_tick || tick_nohz_tick_stopped()) {
>> +			update_idle_cpumask(this_rq(), true);
>>                      tick_nohz_idle_stop_tick();
>
> We already have a callback in tick_nohz_idle_stop_tick(), namely
> nohz_balance_enter_idle().

That's a no-op for !NO_HZ_COMMON though. For similar reasons, Aubrey moved
the clearing of the cpumask to scheduler_tick().

Are you saying this mechanism should only be driven for NO_HZ kernels? I
would tend to agree with Vincent that this could still be useful for idling
without cutting the tick (!NO_HZ or shallow idle state); see:

  20201124170136.GA26613@...gu-book

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ