[RFC] implement QUEUED spinlocks on powerpc

panxinhui xinhui at linux.vnet.ibm.com
Tue Feb 7 17:21:29 AEDT 2017


在 2017/2/2 下午12:40, Eric Dumazet 写道:
> On Wed, Feb 1, 2017 at 8:04 PM, Michael Ellerman <mpe at ellerman.id.au> wrote:
>> Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
>>
>>> On Wed, 2017-02-01 at 09:05 -0800, Eric Dumazet wrote:
>>>> Hi all
>>>>
>>>> Is anybody working on adding QUEUED spinlocks to powerpc 64bit ?
>>>>
>>>> I've seen past attempts with ticket spinlocks
>>>> ( https://patchwork.ozlabs.org/patch/449381/ and other related links
>>>> )
>>>>
>>>> But it looks ticket spinlocks are a thing of the past.
>>>
>>> Yes, we have a tentative implementation of qspinlock and pv variants:
>>>
>>> https://patchwork.ozlabs.org/patch/703139/
>>> https://patchwork.ozlabs.org/patch/703140/
>>> https://patchwork.ozlabs.org/patch/703141/
>>> https://patchwork.ozlabs.org/patch/703142/
>>> https://patchwork.ozlabs.org/patch/703143/
>>> https://patchwork.ozlabs.org/patch/703144/
>>>
>>> Michael, what's the status with getting that merged ?
>>
>> Needs a good review, and the benchmark results were not all that
>> compelling - though perhaps they were just the wrong benchmarks.
>
> A typical benchmark would be to use 200 concurrent netperf -t TCP_RR,
> through a single qdisc (protected by a spinlock)
>
hi all
	I do some netperf tests and get some benchmark results.
I also attach my test script and netperf-result(Excel)

There are two machine. one runs netserver and the other runs netperf 
benchmark. 1000Mbps network is connected with them.

#ip link infomation
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
state UNKNOWN mode DEFAULT group default qlen 1000
      link/ether ba:68:9c:14:32:02 brd ff:ff:ff:ff:ff:ff

According to the results, there is not much performance gap with each 
other. And as we are only testing the throughput, the pvqspinlock shows 
the overhead of its pv stuff. but qspinlock shows a little improvement 
than spinlock. My simple summary in this testcase is
qspinlock > spinlock > pvqspinlock.

when run 200 concurrent netperf, I paste the total throughput here.

	concurrent runners| total throughput | variance
-------------------------------------------
spinlock	| 199 | 66882.8 | 89.93
-------------------------------------------
qspinlock 	| 199 | 66350.4 | 72.0239
-------------------------------------------
pvqspinlock	| 199 | 64740.5 | 85.7837

You could see more data in nerperf.xlsx

thanks
xinhui

> Non ticket/queued spinlocks behave quite bad in this scenario.
>
> I can try this next week if you want.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: np.sh
Type: application/x-sh
Size: 843 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170207/4458c38b/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netperf-restult.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 129045 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170207/4458c38b/attachment-0001.xlsx>


More information about the Linuxppc-dev mailing list