[PATCH v1 01/25] drivers/net: introduce a new PMD driver

Stephen Hemminger stephen at networkplumber.org
Wed Dec 22 17:55:22 CET 2021


On Wed, 22 Dec 2021 08:54:00 +0800
Yanling Song <songyl at ramaxel.com> wrote:

> > If all you want is jiffie accuracy,  you could use
> > CLOCK_MONOTONIC_COARSE.
> >   
> I did not get your point: CLOCK_MONOTONIC is more accurate than
> CLOCK_MONOTONIC_COARSE, right?

CLOCK_MONOTONIC ends up using the TSC counter and values in the
shared page (VDSO) to compute time accurately.

CLOCK_MONOTONIC_COARSE is faster and good enough if you only
want ms accuracy. It just reads a value from shared page
and avoids the TSC instruction.


More information about the dev mailing list