Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 2020 06:52:42 +0000
From:      Wei Hu <weh@microsoft.com>
To:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   MSR accesses that slows down the hypervisor/host
Message-ID:  <SG2P153MB0352138F1A840E8663C039C2BB210@SG2P153MB0352.APCP153.PROD.OUTLOOK.COM>

next in thread | raw e-mail | index | archive | help

Hello,

There are couple AMD processor related MSRs which are being accessed in FreeBSD. 

#define MSR_AMDK8_IPM           0xc0010055
#define MSR_LS_CFG      0xc0011020

We are seeing a lot of CPU time being spent in the host (Hyper-V) in handling traps when accessing these MSRs. Especially the first MRS is frequently being accessed in cpu_idle() so the performance impact to host is significant.

We noted that Linux made some code changes in the 4.10 kernel to access the first MSR much less frequently. So we are wondering if there are similar changes in FreeBSD that might be in the plan. Microsoft Hyper-V team is also planning some work to speed up the accesses to these MSRs. However any suggestions or plan to improve in the FreeBSD guest are welcome.

Thanks,
Wei



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SG2P153MB0352138F1A840E8663C039C2BB210>