Re: [PATCH] Implement timekeeping for rumprun/hw (x86)

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Wed, 01 Jul 2015 00:11:43 +0000

Well, that's a lot of code, apparently a good deal of which comes from having to convert RTC into seconds :(

Does using rdtsc really work as a basis for timekeeping? Doesn't the calibration go off when the clock rate changes? Besides, rdtsc is not available on a 486, which I understood was one of your targets.

I don't understand the fascination with the 100ms calibration delay. Why is 99ms not a good value? Or 10ms? or 1ms? I'd assume 100ms is a value that someone picked out of a hat back when clock rates were around 8MHz and minimizing it simply didn't matter since computers booted for minutes anyway.

I don't understand why you need assembly to do multiplication.

Critically examine need for critical sections.

I'd just get rid of HZ, it serves no purpose.

bmk_cpu_block() is wrong. Just because a timer interrupt fired doesn't mean another interrupt didn't. Seems rather painful doing tickless with i8254...

No need to expose everything that the original clock_subr.h exposes.

uint64_t dt_year? Well that's not going to suffer from y2k issues anytime soon. Why is it unsigned anyway? Does counting start from -bigbang or what? ;)

I'm not entirely happy about the MD/MI split of the code, perhaps that
could be improved. Antti?

Can you elaborate?

Other related posts: