Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-07-27 Thread Chenyi Qiang
On 7/27/2021 4:28 PM, Dr. David Alan Gilbert wrote: * Chenyi Qiang (chenyi.qi...@intel.com) wrote: A bus lock is acquired through either split locked access to writeback (WB) memory or any locked access to non-WB memory. It is typically >1000 cycles slower than an atomic operation within a

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-07-27 Thread Dr. David Alan Gilbert
* Chenyi Qiang (chenyi.qi...@intel.com) wrote: > A bus lock is acquired through either split locked access to writeback > (WB) memory or any locked access to non-WB memory. It is typically >1000 > cycles slower than an atomic operation within a cache and can also > disrupts performance on other

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-06-01 Thread Chenyi Qiang
On 6/2/2021 4:10 AM, Eduardo Habkost wrote: On Tue, Jun 01, 2021 at 02:18:37PM -0400, Eduardo Habkost wrote: On Mon, May 31, 2021 at 01:14:54PM +0800, Chenyi Qiang wrote: On 5/28/2021 5:19 AM, Eduardo Habkost wrote: On Fri, May 21, 2021 at 12:38:20PM +0800, Chenyi Qiang wrote: [...] @@

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-06-01 Thread Eduardo Habkost
On Tue, Jun 01, 2021 at 02:18:37PM -0400, Eduardo Habkost wrote: > On Mon, May 31, 2021 at 01:14:54PM +0800, Chenyi Qiang wrote: > > > > > > On 5/28/2021 5:19 AM, Eduardo Habkost wrote: > > > On Fri, May 21, 2021 at 12:38:20PM +0800, Chenyi Qiang wrote: > > > [...] > > > > @@ -4222,6 +4247,15 @@

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-06-01 Thread Eduardo Habkost
On Mon, May 31, 2021 at 01:14:54PM +0800, Chenyi Qiang wrote: > > > On 5/28/2021 5:19 AM, Eduardo Habkost wrote: > > On Fri, May 21, 2021 at 12:38:20PM +0800, Chenyi Qiang wrote: > > [...] > > > @@ -4222,6 +4247,15 @@ void kvm_arch_pre_run(CPUState *cpu, struct > > > kvm_run *run) > > > }

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-05-30 Thread Chenyi Qiang
On 5/28/2021 5:19 AM, Eduardo Habkost wrote: On Fri, May 21, 2021 at 12:38:20PM +0800, Chenyi Qiang wrote: [...] @@ -4222,6 +4247,15 @@ void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run) } } +static void kvm_rate_limit_on_bus_lock(void) +{ +uint64_t delay_ns =

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-05-27 Thread Eduardo Habkost
On Fri, May 21, 2021 at 12:38:20PM +0800, Chenyi Qiang wrote: [...] > @@ -4222,6 +4247,15 @@ void kvm_arch_pre_run(CPUState *cpu, struct kvm_run > *run) > } > } > > +static void kvm_rate_limit_on_bus_lock(void) > +{ > +uint64_t delay_ns =