Re: [PATCH v3 5/6] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

Waiman Long
2020-07-23T18:32:44Z

On 7/23/20 10:00 AM, Peter Zijlstra wrote:
> On Thu, Jul 09, 2020 at 12:06:13PM -0400, Waiman Long wrote:
>> We don't really need to do a pv_spinlocks_init() if pv_kick() isn't
>> supported.
> Waiman, if you cannot explain how not having kick is a sane thing, what
> are you saying here?
>
The current PPC paravirt spinlock code doesn't do any cpu kick. It does
an equivalence of pv_wait by yielding the cpu to the lock holder only.
The pv_spinlocks_init() is for setting up the hash table for doing
pv_kick. If we don't need to do pv_kick, we don't need the hash table.

I am not saying that pv_kick is not needed for the PPC environment. I
was just trying to adapt the pvqspinlock code to such an environment
first. Further investigation on how to implement some kind of pv_kick
will be something that we may want to do as a follow on.

BTW, do you have any comment on my v2 lock holder cpu info qspinlock
patch? I will have to update the patch to fix the reported 0-day test
problem, but I want to collect other feedback before sending out v3.

Cheers,
Longman