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: <456776A3.7070607@candelatech.com>
Date:	Fri, 24 Nov 2006 14:48:03 -0800
From:	Ben Greear <greearb@...delatech.com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...l.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch] x86: unify/rewrite SMP TSC sync code

Ingo Molnar wrote:
> nor can the TSC really be synced up properly in the hotplug CPU case, 
> after the fact - what if the app already read out an older TSC value and 
> a new CPU is added. If the TSC isnt sync on SMP then it quickly gets 
> pretty messy, and we should rather take a look at /why/ these apps are 
> using RDTSC.
>   

I've been using RDTSC in pktgen.  For my app, I am just trying to find a 
quick
way to determine if X nano-seconds have elapsed.  If it's occasionally 
off by a small amount,
that is OK as I have higher-level control logic that will correct 
long-term trends.

After poking around, I ended up just exporting sched_clock() and using that
instead of directly using RDTSC, but that was mostly just for convenience.

If RDTSC is not a good choice for the use I describe above, is there a 
better
method that is still very fast (as compared to do_gettimeofday())?

Thanks,
Ben

-- 
Ben Greear <greearb@...delatech.com> 
Candela Technologies Inc  http://www.candelatech.com


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ