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: <8044fbf6-5285-d0eb-9e71-f2307c6c0fda@linux.intel.com>
Date:   Mon, 16 Oct 2017 14:03:50 +0800
From:   "Li, Aubrey" <aubrey.li@...ux.intel.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Aubrey Li <aubrey.li@...el.com>
Cc:     tglx@...utronix.de, peterz@...radead.org, len.brown@...el.com,
        ak@...ux.intel.com, tim.c.chen@...ux.intel.com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 7/8] cpuidle: introduce irq timing to make idle
 prediction

On 2017/10/14 9:01, Rafael J. Wysocki wrote:
> On Saturday, September 30, 2017 9:20:33 AM CEST Aubrey Li wrote:
>> Introduce irq timings output as a factor to predict the duration
>> of the coming idle
>>
>> @@ -342,13 +343,27 @@ void cpuidle_entry_end(void)
>>  void cpuidle_predict(void)
>>  {
>>  	struct cpuidle_device *dev = cpuidle_get_device();
>> -	unsigned int overhead_threshold;
>> +	unsigned int idle_interval, overhead_threshold;
>> +	u64 now, next_evt;
>>  
>>  	if (!dev)
>>  		return;
>>  
>>  	overhead_threshold = dev->idle_stat.overhead * sysctl_fast_idle_ratio;
>>  
>> +	/*
>> +	 * check irq timings if the next event is coming soon
>> +	 */
>> +	now = local_clock();
>> +	local_irq_disable();
>> +	next_evt = irq_timings_next_event(now);
>> +	local_irq_enable();
>> +	idle_interval = div_u64(next_evt - now, NSEC_PER_USEC);
> 
> Another division ...
> 
okay, will replace with >>10 if micro-second is agreed to be the comparing unit

Thanks,
-Aubrey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ