Date: Tue, 7 Jan 2025 02:19:37 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 215c8b79c498 - main - riscv/vmm: Make vcpu sleep periods consistent with other platforms Message-ID: <202501070219.5072JbeR029090@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=215c8b79c498f647afcbe9fa9076c2c3329e09b4 commit 215c8b79c498f647afcbe9fa9076c2c3329e09b4 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-01-07 02:15:23 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-01-07 02:15:23 +0000 riscv/vmm: Make vcpu sleep periods consistent with other platforms There's no apparent reason for the difference here, so let's be consistent to make merging easier. Tested by: br --- sys/riscv/vmm/vmm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index 0596e0de2e43..f7cbfc1dfea5 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -1125,8 +1125,7 @@ vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, if (from_idle) { while (vcpu->state != VCPU_IDLE) { vcpu_notify_event_locked(vcpu); - msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", - hz / 1000); + msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", hz); } } else { KASSERT(vcpu->state != VCPU_IDLE, ("invalid transition from " @@ -1425,7 +1424,7 @@ vm_handle_wfi(struct vcpu *vcpu, struct vm_exit *vme, bool *retu) * XXX msleep_spin() cannot be interrupted by signals so * wake up periodically to check pending signals. */ - msleep_spin(vcpu, &vcpu->mtx, "vmidle", hz / 1000); + msleep_spin(vcpu, &vcpu->mtx, "vmidle", hz); vcpu_require_state_locked(vcpu, VCPU_FROZEN); } vcpu_unlock(vcpu);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501070219.5072JbeR029090>