[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 16/16] x86/kvmclock: Use TSC for sched_clock if it's constant and non-stop
 
- To: Michael Kelley <mhklinux@xxxxxxxxxxx>
 
- From: Sean Christopherson <seanjc@xxxxxxxxxx>
 
- Date: Wed, 12 Feb 2025 14:55:36 -0800
 
- Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, 	Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, 	"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, 	"K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, 	Dexuan Cui <decui@xxxxxxxxxxxxx>, Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>, 	Jan Kiszka <jan.kiszka@xxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, 	Andy Lutomirski <luto@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, 	"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, 	"linux-coco@xxxxxxxxxxxxxxx" <linux-coco@xxxxxxxxxxxxxxx>, 	"virtualization@xxxxxxxxxxxxxxx" <virtualization@xxxxxxxxxxxxxxx>, 	"linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, 	"xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Nikunj A Dadhania <nikunj@xxxxxxx>, 	Tom Lendacky <thomas.lendacky@xxxxxxx>
 
- Delivery-date: Wed, 12 Feb 2025 22:55:46 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Wed, Feb 12, 2025, Michael Kelley wrote:
> From: Sean Christopherson <seanjc@xxxxxxxxxx> Sent: Monday, February 10, 2025 
> 8:22 AM
> > On Sat, Feb 08, 2025, Michael Kelley wrote:
> > > But I would be good with some restructuring so that setting the sched 
> > > clock
> > > save/restore hooks is more closely tied to the sched clock choice,
> > 
> > Yeah, this is the intent of my ranting.  After the dust settles, the code 
> > can
> > look like this.
> 
> I'm good with what you are proposing. And if you want, there's no real need
> for hv_ref_counter_at_suspend and hv_save/restore_sched_clock_state()
> to be in the #ifdef sequence since the code has no architecture dependencies.
Right, but because they will be local/static and there are no users outside of
x86, the compiler will complain about unused variables/functions on other
architectures.
 
 
    
     |