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: <bac49956-5968-3513-b487-28f99f214967@linux.alibaba.com>
Date:   Wed, 12 Jul 2023 10:41:11 +0800
From:   cruzzhao <cruzzhao@...ux.alibaba.com>
To:     Aaron Lu <aaron.lu@...el.com>
Cc:     gregkh@...uxfoundation.org, jirislaby@...nel.org, 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,
        bristot@...hat.com, vschneid@...hat.com, paulmck@...nel.org,
        quic_neeraju@...cinc.com, joel@...lfernandes.org,
        josh@...htriplett.org, boqun.feng@...il.com,
        mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
        qiang1.zhang@...el.com, jstultz@...gle.com,
        clingutla@...eaurora.org, nsaenzju@...hat.com, tglx@...utronix.de,
        frederic@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] sched/core: introduce sched_core_idle_cpu()



在 2023/7/4 下午1:39, Aaron Lu 写道:
>> +#ifdef CONFIG_SCHED_CORE
>> +int sched_core_idle_cpu(int cpu)
>> +{
>> +	struct rq *rq = cpu_rq(cpu);
>> +
>> +	if (sched_core_enabled(rq) && rq->curr == rq->idle)
>> +		return 1;
> 
> If the intention is to consider forced idle cpus as idle, then should
> the above condition written as:
> 
> 	if (sched_core_enabled(rq) && rq->core->core_forceidle_count)
> 		return 1;
> ?
> 
> Or as long as a single cookied task is running, all normal idle cpus are
> regarded forced idle here and 1 is returned while previously, idle_cpu()
> is called for those cpus and if they have wakeup task pending, they are
> not regarded as idle so looks like a behaviour change.
> 
> Thanks,
> Aaron
> 

I'll fix this problem in the next version.

Best,
Cruz Zhao

>> +
>> +	return idle_cpu(cpu);
>> +}
>> +
>> +#endif
>> +
>>  #ifdef CONFIG_SMP
>>  /*
>>   * This function computes an effective utilization for the given CPU, to be
>> diff --git a/kernel/softirq.c b/kernel/softirq.c
>> index c8a6913c067d..98b98991ce45 100644
>> --- a/kernel/softirq.c
>> +++ b/kernel/softirq.c
>> @@ -630,7 +630,7 @@ static inline void tick_irq_exit(void)
>>  	int cpu = smp_processor_id();
>>  
>>  	/* Make sure that timer wheel updates are propagated */
>> -	if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
>> +	if ((sched_core_idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
>>  		if (!in_hardirq())
>>  			tick_nohz_irq_exit();
>>  	}
>> -- 
>> 2.27.0
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ