[dpdk-dev] [PATCH] timer: add lfence before TSC read

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jan 27 10:57:52 CET 2014


24/01/2014 12:42, François-Frédéric Ozog:
> IMHO, adding the lfence for all cases is introducing an un-necessary
> performance penalty.
> 
> What about adding rte_rdtsc_sync() or rte_rdtsc_serial() with the comment
> about the rdtsc instruction behavior so that developers can choose which
> form they want?

Yes it could be a good idea in some cases. Didier, could you try to add such 
function ?

But in some debugging cases we need to have high precision for almost all 
timestamps. Here I don't know what is the smartest solution.

Thank you for commenting. Hope we'll find a good fix.
-- 
Thomas


More information about the dev mailing list