From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A8F019F49E for ; Thu, 5 Sep 2024 16:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725553241; cv=none; b=G2iOMIf7tbIpd4GMICehoc6r5qVWsZXxGgEZPF8TFTFqYi5rMZwhDtReBawBobsFNY6CLWjTqUd5r5cwcKLg+nXjHngHFk0GhJzK0SuS7LlYpybRgYxn5wZoNQdKi/LcP8kxmjEj2//FoWRgzoTOCDbb7pQW48v9OK/BDHlfvNQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725553241; c=relaxed/simple; bh=n04gPQHvDkHClWZLlSJYgzA0AjqGslLWpNik4Jq1KMM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QeY4OYLX9IuAyP1QrphUUFWay3XHZTEP2UdL1LUNPpg0P/BcIiOGZFlPW9Pzwf5kE7aHxBGAtW/4Kw4hUpy5aHfyUAF/jjIQX1dxdKrlGC+a27O/Tzv1mRQUAOy5Jshmfe9BIgnBJdZKsOOXkyFZqaPyQwdUEkGUNvQKcFOVbPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=G1rVmZTc; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G1rVmZTc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725553238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9TyHzQXM3uFT+3nz9MywkA1E5XwrT2IxpHMEhawq1JI=; b=G1rVmZTc0A9YiPt4yTQ4MQnXTdZl8lwRUAz58IdQB7JBuDD1QR+zGirJsQdJ88IZtINRSl k2N3a51yHj9oHxIeU9r3mE+A7KjD4bn1bLsJMtvgheLdgbaSA9lJEvR7gZjklmGkQPL7e+ T+DPPTJKKsHupKDaPw+/J/X9bZTJdhA= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-W8ivkgECOSuplGP9zlYeWA-1; Thu, 05 Sep 2024 12:20:32 -0400 X-MC-Unique: W8ivkgECOSuplGP9zlYeWA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A5F77181E042; Thu, 5 Sep 2024 16:20:00 +0000 (UTC) Received: from virtlab1023.lab.eng.rdu2.redhat.com (virtlab1023.lab.eng.rdu2.redhat.com [10.8.1.187]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E6A131956056; Thu, 5 Sep 2024 16:19:57 +0000 (UTC) From: Paolo Bonzini To: Steven Rostedt Cc: LKML , kvm@vger.kernel.org, Sean Christopherson , Thomas Gleixner , x86@kernel.org, Joel Fernandes , Suleiman Souhlal , Vineeth Pillai , Borislav Petkov , Anna-Maria Behnsen , Peter Zijlstra , Viresh Kumar , Frederic Weisbecker Subject: Re: [RFC][PATCH] KVM: Remove HIGH_RES_TIMERS dependency Date: Thu, 5 Sep 2024 12:19:27 -0400 Message-ID: <20240905161926.186090-2-pbonzini@redhat.com> In-Reply-To: <20240821095127.45d17b19@gandalf.local.home> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 > Commit 92b5265d38f6a ("KVM: Depend on HIGH_RES_TIMERS") added a dependency > to high resolution timers with the comment: > > KVM lapic timer and tsc deadline timer based on hrtimer, > setting a leftmost node to rb tree and then do hrtimer reprogram. > If hrtimer not configured as high resolution, hrtimer_enqueue_reprogram > do nothing and then make kvm lapic timer and tsc deadline timer fail. > > That was back in 2012, where hrtimer_start_range_ns() would do the > reprogramming with hrtimer_enqueue_reprogram(). But as that was a nop with > high resolution timers disabled, this did not work. But a lot has changed > in the last 12 years. > > For example, commit 49a2a07514a3a ("hrtimer: Kick lowres dynticks targets on > timer enqueue") modifies __hrtimer_start_range_ns() to work with low res > timers. There's been lots of other changes that make low res work. > > I added this change to my main server that runs all my VMs (my mail > server, my web server, my ssh server) and disabled HIGH_RES_TIMERS and the > system has been running just fine for over a month. > > ChromeOS has tested this before as well, and it hasn't seen any issues with > running KVM with high res timers disabled. > > Signed-off-by: Steven Rostedt (Google) Queued, thanks. Paolo