RE: [PATCH] x86/Hyper-V: Fix hv sched clock function return wrong time unit

From: Yubo Xie
Date: Wed Mar 25 2020 - 14:57:22 EST


I use "time" to run some performance tests in our project under WSL2, but the result looks weird: the value of "real" is far from the sum of "user" + "sys".

-----Original Message-----
From: Dexuan Cui <decui@xxxxxxxxxxxxx>
Sent: Wednesday, March 25, 2020 11:46 AM
To: Yubo Xie <ltykernel@xxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>; Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>; Wei Liu <liuwe@xxxxxxxxxxxxx>; daniel.lezcano@xxxxxxxxxx; tglx@xxxxxxxxxxxxx; Michael Kelley <mikelley@xxxxxxxxxxxxx>
Cc: Yubo Xie <yuboxie@xxxxxxxxxxxxx>; linux-hyperv@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; vkuznets <vkuznets@xxxxxxxxxx>; stable@xxxxxxxxxxxxxxx; Tianyu Lan <Tianyu.Lan@xxxxxxxxxxxxx>
Subject: RE: [PATCH] x86/Hyper-V: Fix hv sched clock function return wrong time unit

> From: linux-hyperv-owner@xxxxxxxxxxxxxxx
> <linux-hyperv-owner@xxxxxxxxxxxxxxx> On Behalf Of Yubo Xie
> Sent: Tuesday, March 24, 2020 8:20 AM
> ...
> sched clock callback should return time with nano second as unit but
> current hv callback returns time with 100ns. Fix it.

Hi Yubo,
I'm curious how you found the bug? :-) Did you notice some kind of symtom?

Thanks,
-- Dexuan