Date: Mon, 4 Jul 2022 18:09:34 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 5c55abaf0851 - stable/13 - hwpmc: Reenable PME before reenabling counters. Message-ID: <202207041809.264I9Yim064654@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=5c55abaf0851b3334d3c2a4b9e6cf1ededbac3c8 commit 5c55abaf0851b3334d3c2a4b9e6cf1ededbac3c8 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2022-06-15 15:39:37 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2022-07-04 17:48:10 +0000 hwpmc: Reenable PME before reenabling counters. Doing otherwise may lead to lost interrupts, that in combination with hardware PMCs freezing may leave them frozen forever. It may also slightly improve profiling accuracy. MFC after: 2 weeks (cherry picked from commit f9e62419f6daf226a7116be2601842f8f07b1928) --- sys/dev/hwpmc/hwpmc_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 7c2a5bcd2a1b..692d7fcd52d9 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -1208,6 +1208,9 @@ core2_intr(struct trapframe *tf) else counter_u64_add(pmc_stats.pm_intr_ignored, 1); + if (found_interrupt) + lapic_reenable_pmc(); + /* * Reenable all non-stalled PMCs. */ @@ -1228,9 +1231,6 @@ core2_intr(struct trapframe *tf) (uintmax_t) rdmsr(IA_GLOBAL_CTRL), (uintmax_t) rdmsr(IA_GLOBAL_STATUS)); - if (found_interrupt) - lapic_reenable_pmc(); - return (found_interrupt); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207041809.264I9Yim064654>