Re: [patch] x86: unify/rewrite SMP TSC sync code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux