I noticed that the “jiffies” line from the /proc/timer_list file has a value that is not scaled via the USER_HZ constant. Looking into the source code of the kernel/time/timer_list.c file, I found lines 189-190 to be the cause: SEQ_printf(m, "jiffies: %Lu\n", (unsigned long long)jiffies); The actual kernel jiffies are printed out directly without scaling. I was under the impression that all kernel jiffies should be scaled via USER_HZ -- e.g. through the jiffies_to_clock_t function provided by include/linux/jiffies.h -- before exposure in userspace. Is my impression correct? If not, when are kernel jiffies scaled via USER_HZ, and when are they not?
This is not a bug; behaviour is intentional. To quote TThomas Gleixner (http://lkml.org/lkml/2015/8/22/86): > All instances which are de facto APIs, syscalls and also various files > in proc/ must be in USER_HZ because userspace applications depend on > the USER_HZ value. > > proc/timer_list is exempt from that because its more a debugging > interface which is not part of the strict kernel API. And we really > want to see the real values and not the scaled USER_HZ ones for that > purpose. I hope that answers your question.