Re: [PATCH] time/timecounter: inline timecounter_cyc2time()
From: Jason Xing
Date: Tue Jan 20 2026 - 03:19:06 EST
On Sat, Nov 29, 2025 at 5:57 PM Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
>
> New network transport protocols want NIC drivers to get hwtstamps
> of all incoming packets, and possibly all outgoing packets.
>
> Swift congestion control is used by good old TCP transport and is
> our primary need for timecounter_cyc2time(). This will be upstreamed soon.
>
> This means timecounter_cyc2time() can be called more than 100 million
> times per second on a busy server.
>
> Inlining timecounter_cyc2time() brings a 12 % improvement on a
> UDP receive stress test on a 100Gbit NIC.
>
> Note that FDO, LTO, PGO are unable to magically help for this
> case, presumably because NIC drivers are almost exclusively shipped
> as modules.
>
> Add an unlikely() around the cc_cyc2ns_backwards() case,
> even if FDO (when used) is able to take care of this optimization.
>
> Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>
> Link: https://research.google/pubs/swift-delay-is-simple-and-effective-for-congestion-control-in-the-datacenter/
> Cc: Kevin Yang <yyd@xxxxxxxxxx>
> Cc: Willem de Bruijn <willemb@xxxxxxxxxx>
> Cc: Neal Cardwell <ncardwell@xxxxxxxxxx>
> Cc: Yuchung Cheng <ycheng@xxxxxxxxxx>
When I'm browsing the modification related to SWIFT, I noticed this
patch seems to have not been merged yet?
Thanks,
Jason