RE: [PATCH next 5/5] locking/osq_lock: Optimise vcpu_is_preempted() check.

2023-12-30 Thread David Laight
From: Waiman Long > Sent: 30 December 2023 15:57 > > On 12/29/23 22:13, Waiman Long wrote: > > > > On 12/29/23 15:58, David Laight wrote: > >> The vcpu_is_preempted() test stops osq_lock() spinning if a virtual > >>    cpu is no longer running. > >> Although patched out for bare-metal the code

Re: [PATCH next 5/5] locking/osq_lock: Optimise vcpu_is_preempted() check.

2023-12-30 Thread Waiman Long
On 12/29/23 22:13, Waiman Long wrote: On 12/29/23 15:58, David Laight wrote: The vcpu_is_preempted() test stops osq_lock() spinning if a virtual    cpu is no longer running. Although patched out for bare-metal the code still needs the cpu number. Reading this from 'prev->cpu' is a pretty much

Re: [PATCH next 5/5] locking/osq_lock: Optimise vcpu_is_preempted() check.

2023-12-29 Thread Waiman Long
On 12/29/23 15:58, David Laight wrote: The vcpu_is_preempted() test stops osq_lock() spinning if a virtual cpu is no longer running. Although patched out for bare-metal the code still needs the cpu number. Reading this from 'prev->cpu' is a pretty much guaranteed have a cache miss when

[PATCH next 5/5] locking/osq_lock: Optimise vcpu_is_preempted() check.

2023-12-29 Thread David Laight
The vcpu_is_preempted() test stops osq_lock() spinning if a virtual cpu is no longer running. Although patched out for bare-metal the code still needs the cpu number. Reading this from 'prev->cpu' is a pretty much guaranteed have a cache miss when osq_unlock() is waking up the next cpu. Instead