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:   Tue, 31 Jan 2023 17:39:11 +0530
From:   shrikanth hegde <sshegde@...ux.vnet.ibm.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     tglx@...utronix.de, peterz@...radead.org, arjan@...ux.intel.com,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
        svaidy@...ux.ibm.com, linux-kernel@...r.kernel.org,
        bigeasy@...utronix.de
Subject: Re: [RFC PATCH] hrtimer: interleave timers for improved single thread
 performance at low utilization



On 1/31/23 4:07 PM, Ingo Molnar wrote:
> 
> * shrikanth hegde <sshegde@...ux.vnet.ibm.com> wrote:
> 
>> ---
>>  kernel/time/hrtimer.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
>> index 3ae661ab6260..d160f49f0cce 100644
>> --- a/kernel/time/hrtimer.c
>> +++ b/kernel/time/hrtimer.c
>> @@ -1055,6 +1055,17 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
>>
>>  		orun = ktime_divns(delta, incr);
>>  		hrtimer_add_expires_ns(timer, incr * orun);
>> +		/*
>> +		 * Avoid timer round-off, so that all cfs bandwidth timers
>> +		 * don't start at the same time
>> +		 */
>> +		if (incr >= 100000000ULL) {
>> +			s64 interleave = 0;
>> +			interleave = ktime_sub_ns(delta,  incr * orun);
>> +			interleave = interleave - (ktime_to_ns(delta) % (incr/10));
>> +			if (interleave > 0)
>> +				hrtimer_add_expires_ns(timer, interleave);
>> +		}
> 
> Any reason why you did this in the hrtimer code, instead of the 
> (sched_cfs_period_timer?) hrtimer handler itself?
> 
> Thanks,
> 
> 	Ingo


Yes. Thanks for making me think in that way.                                       
This can be done in start_cfs_bandwidth by setting an initial expiry value.     
Tried that change. it works in interleaving the timers.                         
                                                                                
Will do bit more testing and send out the patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ