spinlocks

Anton Blanchard anton at samba.org
Sun Jan 11 12:35:38 EST 2004


> >3. Separate spinlocks for iseries and pseries where most of it is
> >duplicated.
> I do not follow this point -

Was just thinking out aloud, perhaps the inline portion of the iseries
and pseries spinlocks could be shared. (Assuming we out of line the
SPLPAR bits.

> It is a tricky case, but the sequence is required.  Here is the situation:
>
> Proc A holds the lock
> Proc B sees proc A as the holder, then gets preempted
> Proc A drops the lock, then cedes for a long time
> Proc B reads proc A's yield count, which is valid (odd)
> Proc B confers to proc A, but does not wake up until after A is dispatched.
>
> The lwsync + reread ensures this cannot occur.

OK. Im wondering what stops that scenario from happening in the 5
instructions between when we reverify the lock holder and actually call
into the hypervisor.

> While I agree performance is less important in SPLPAR mode than
> dedicated, it is still important.  The vast majority of customers on
> iSeries run in this mode.

Sure. Do we have an estimate for the path length for a phyp confer hcall
where we return straight back to the partition? If its in the order of a
100 instructions, then I prefer to add 10 instructions in linux to
that path rather than 10 instructions to the non SPLPAR path.

Anton

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list