Re: [PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-07-14 Thread Chen Yu
On 2024-06-25 at 20:54:03 +0800, Chen Yu wrote: > The kernel can change spinlock behavior when running as a guest. But > this guest-friendly behavior causes performance problems on bare metal. > So there's a 'virt_spin_lock_key' static key to switch between the two > modes. > > The static key is a

Re: [PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-06-25 Thread Nikolay Borisov
On 25.06.24 г. 15:54 ч., Chen Yu wrote: The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. So there's a 'virt_spin_lock_key' static key to switch between the two modes. The static key is always enabled b

RE: [PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-06-25 Thread Zhuo, Qiuxu
> From: Nikolay Borisov > [...] > >> Actually now shouldn't the CONFIG_PARAVIRT_SPINLOCKS check be > retained? > >> Otherwise we'll have the virtspinlock enabled even if we are a guest > >> but CONFIG_PARAVIRT_SPINLOCKS is disabled, no ? > >> > > > > It seems to be the expected behavior? If CONFIG

Re: [PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-06-25 Thread Nikolay Borisov
On 25.06.24 г. 17:50 ч., Chen Yu wrote: On 2024-06-25 at 16:42:11 +0300, Nikolay Borisov wrote: On 25.06.24 г. 15:54 ч., Chen Yu wrote: The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. So there's a

Re: [PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-06-25 Thread Chen Yu
On 2024-06-25 at 16:42:11 +0300, Nikolay Borisov wrote: > > > On 25.06.24 г. 15:54 ч., Chen Yu wrote: > > The kernel can change spinlock behavior when running as a guest. But > > this guest-friendly behavior causes performance problems on bare metal. > > So there's a 'virt_spin_lock_key' static k

Re: [PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-06-25 Thread Nikolay Borisov
On 25.06.24 г. 15:54 ч., Chen Yu wrote: The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. So there's a 'virt_spin_lock_key' static key to switch between the two modes. The static key is always enabled b

[PATCH v3] x86/paravirt: Disable virt spinlock on bare metal

2024-06-25 Thread Chen Yu
The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. So there's a 'virt_spin_lock_key' static key to switch between the two modes. The static key is always enabled by default (run in guest mode) and should be d