[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240130072238.2829831-1-maobibo@loongson.cn>
Date: Tue, 30 Jan 2024 15:22:36 +0800
From: Bibo Mao <maobibo@...ngson.cn>
To: Tianrui Zhao <zhaotianrui@...ngson.cn>,
Huacai Chen <chenhuacai@...nel.org>
Cc: kvm@...r.kernel.org,
loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] LoongArch: KVM: Start SW timer only when vcpu is blocking
SW timer is enabled when vcpu thread is scheduled out, and it is
to wake up vcpu from blocked queue. If vcpu thread is scheduled out
however is not blocked, such as it is preempted by other threads,
it is not necessary to enable SW timer. Since vcpu thread is still
on running queue and SW timer is only to wake up tasks on blocking
queue, so SW timer is not useful in this situation.
This patch enables SW timer only when vcpu is scheduled out and
is blocking. Also when SW timer is expired, it only wakes up vcpu
thread in blocking queue and need not restart SW timer.
Bibo Mao (2):
LoongArch: KVM: Start SW timer only when vcpu is blocking
LoongArch: KVM: Do not restart SW timer when it is expired
arch/loongarch/kvm/timer.c | 42 ++++++++------------------------------
1 file changed, 9 insertions(+), 33 deletions(-)
base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3
--
2.39.3
Powered by blists - more mailing lists