Date: Fri, 10 Sep 2021 00:02:26 GMT From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: cd165c8bf054 - main - x86/tsc.c: Add TSLOG to test_tsc Message-ID: <202109100002.18A02Q91004256@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=cd165c8bf05452d38ce552ae819d87378fecf52f commit cd165c8bf05452d38ce552ae819d87378fecf52f Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2021-09-10 00:01:00 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2021-09-10 00:02:15 +0000 x86/tsc.c: Add TSLOG to test_tsc On my benchmark system this takes ~ 14 ms; enough to be worth recording in the boot time profile. --- sys/x86/x86/tsc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 0ebcea895cd3..15e6037c68ee 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -511,6 +511,7 @@ test_tsc(int adj_max_count) if (vm_guest == VM_GUEST_VBOX) return (0); + TSENTER(); size = (mp_maxid + 1) * 3; data = malloc(sizeof(*data) * size * N, M_TEMP, M_WAITOK); adj = 0; @@ -531,6 +532,7 @@ retry: printf("SMP: %sed TSC synchronization test%s\n", smp_tsc ? "pass" : "fail", adj > 0 ? " after adjustment" : ""); + TSEXIT(); if (smp_tsc && tsc_is_invariant) { switch (cpu_vendor_id) { case CPU_VENDOR_AMD:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109100002.18A02Q91004256>