Skip to content

RFC : ktime + nano-second clock resolution for packet schedulers

Patrick McHardy netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3: Add jiffies_to_nsecs/nsecs_to_jiffiesinclude/linux/jiffies.h kernel/time.c+28 -00 replies
2/3: Replace gettimeofday clocksource by ktimeinclude/net/pkt_sched.h kernel/hrtimer.c net/sched/sch_api.c +1 more+30 -1240 replies
3/3: Add support for nano-second clock resolutioninclude/net/pkt_sched.h net/sched/Kconfig net/sched/sch_api.c +1 more+42 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC NET_SCHED 00/03]: ktime + nano-second clock resolution for packet schedulers

These patches convert the GETTIMEOFDAY packet scheduler clock source to ktime (based on Stephen's patch) and add support for using nano-second clock resolution. I chose a scalar time representation within the packet schedulers instead of ktime_t since it minimizes the ktime_to_ns() calls in most cases, it allows to clean up pkt_sched.h quite a bit and HFSC needs it anyway.

Unlike my previous attempt at this, these patches keep old iproute versions working with nano-second resolution with the exception of HFSC. I'm not sure what to do about HFSC yet, so just RFC for now.

 include/linux/jiffies.h |    2 
 include/net/pkt_sched.h |  141 ++++++++++--------------------------------------
 kernel/hrtimer.c        |    1 
 kernel/time.c           |   26 ++++++++
 net/sched/Kconfig       |   17 +++++
 net/sched/sch_api.c     |   11 ++-
 net/sched/sch_hfsc.c    |   37 +++++-------
 7 files changed, 100 insertions(+), 135 deletions(-)

Patrick McHardy:
[TIME]: Add jiffies_to_nsecs/nsecs_to_jiffies [NET_SCHED]: Replace gettimeofday clocksource by ktime [NET_SCHED]: Add support for nano-second clock resolution