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] [day] [month] [year] [list]
Date:	Fri, 14 Jun 2013 09:14:49 +0300
From:	Eliezer Tamir <eliezer.tamir@...ux.intel.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	David Miller <davem@...emloft.net>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@...el.com>,
	Don Skidmore <donald.c.skidmore@...el.com>,
	e1000-devel@...ts.sourceforge.net,
	Willem de Bruijn <willemb@...gle.com>,
	Ben Hutchings <bhutchings@...arflare.com>,
	Andi Kleen <andi@...stfloor.org>, HPA <hpa@...or.com>,
	Eilon Greenstien <eilong@...adcom.com>,
	Or Gerlitz <or.gerlitz@...il.com>,
	Amir Vadai <amirv@...lanox.com>,
	Alex Rosenbaum <alexr@...lanox.com>,
	Avner Ben Hanoch <avnerb@...lanox.com>,
	Or Kehati <ork@...lanox.com>, sockperf-dev@...glegroups.com,
	Eliezer Tamir <eliezer@...ir.org.il>
Subject: Re: [PATCH v4 net-next 2/4] net: convert low latency sockets to sched_clock()

On 14/06/2013 06:12, Eric Dumazet wrote:
> On Fri, 2013-06-14 at 04:57 +0300, Eliezer Tamir wrote:
>> Use sched_clock() instead of get_cycles().
>> We can use sched_clock() because we don't care much about accuracy.
>> Remove the dependency on X86_TSC
>>
>> Signed-off-by: Eliezer Tamir <eliezer.tamir@...ux.intel.com>
>> ---
>
>>
>> -static inline bool can_poll_ll(cycles_t end_time)
>> +static inline bool can_poll_ll(u64 end_time)
>>   {
>> -	return !time_after((unsigned long)get_cycles(),
>> +	return !time_after((unsigned long)sched_clock(),
>>   			    (unsigned long)end_time);
>>   }
>
> I do not really understand why you bother to have 64bit wide values,
> and then use these "unsigned long" casts here.
>
> On 32bit arches, this will really limit to 2^31 ns range.
>
> You should instead either :
> - use time_after_64() or
> - explicitly limit sysctl_net_ll_poll range

OK
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ