Re: [PATCH 0/1] RFC: poll/select performance on datagram sockets

From: Davide Libenzi
Date: Fri Oct 29 2010 - 17:59:53 EST


On Fri, 29 Oct 2010, Eric Dumazet wrote:

> Following patch solves the problem for me, and its only a start, I am
> pretty sure we can optimize more than that.
>
> What I did is to move "struct poll_wqueues table;" out of do_select()
> in its caller. This structure is highly modified by an other cpu in
> Alban workload, and this slow down do_select() because many accesses to
> some of its local variables (normally, private ones !) hit a false
> sharing.
>
> Before :
>
> # time /root/uclient connected
> The performance problem will be triggered
> select: begin
> select: end: 3 seconds
>
> real 0m3.101s
> user 0m0.000s
> sys 0m6.104s
>
> After :
>
> # time /root/uclient connected
> The performance problem will be triggered
> select: begin
> select: end: 1 seconds
>
> real 0m1.041s
> user 0m0.004s
> sys 0m2.040s
>
>
> Impressive no ?

It is, though I am not sure that shuffling code around to chase false
sharing on very specific cases, is an approach worth following.
The new position of the table on the stack might share with another hot
line, under a different load.


- Davide


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/