[Crash-utility] [PATCH] Fix machdep->HZ calculation for kernel versions > 2.6.0
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Tue Jan 12 08:24:08 UTC 2021
Hi Bhupesh,
-----Original Message-----
> We have hard-coded the HZ value for some ARCHs to either 1000 or 100
> (mainly for kernel versions > 2.6.0), which causes 'help -m' to show
> an incorrect hz value for various architectures.
Good catch. but seems crash uses (cfq_slice_async * 25) for machdep->hz
if it exists (please see task_init()), RHEL7 has it, but RHEL8 does not.
What do you see on RHEL8 for x86_64 with your patch?
We should search for an alternate way like the current one first.
Thanks,
Kazu
>
> I tested this on ppc64le and x86_64 and the hz value reported is 1000,
> whereas the kernel CONFIG_HZ_100 is set to Y. See some logs below:
>
> crash> help -m
> flags: 124000f5
> (KSYMS_START|MACHDEP_BT_TEXT|VM_4_LEVEL|VMEMMAP|VMEMMAP_AWARE|PHYS_ENTRY_L4|SWAP_ENTRY_L4|RADIX_MMU|OP
> AL_FW)
> kvbase: c000000000000000
> identity_map_base: c000000000000000
> pagesize: 65536
> pageshift: 16
> pagemask: ffffffffffff0000
> pageoffset: ffff
> stacksize: 16384
> hz: 1000
> mhz: 2800
>
> [host at rhel7]$ grep CONFIG_HZ_100= redhat/configs/kernel-3.10.0-ppc64le.config
> CONFIG_HZ_100=y
>
> Fix the same by using the sysconf(_SC_CLK_TCK) value instead of the
> hardcoded HZ values depending on kernel versions.
>
More information about the Crash-utility
mailing list