[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82f68be0-95fb-0d61-9d0a-4c74afb626b5@mellanox.com>
Date: Wed, 15 Feb 2017 16:52:43 +0200
From: "Matan Barak (External)" <matanb@...lanox.com>
To: Saeed Mahameed <saeedm@....mellanox.co.il>,
Eric Dumazet <eric.dumazet@...il.com>
CC: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
"Tariq Toukan" <tariqt@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>, <jackm@...lanox.com>
Subject: Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary
On 15/02/2017 13:10, Saeed Mahameed wrote:
> On Fri, Feb 10, 2017 at 2:27 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>> From: Eric Dumazet <edumazet@...gle.com>
>>
>> All rx and rx netdev interrupts are handled by respectively
>> by mlx4_en_rx_irq() and mlx4_en_tx_irq() which simply schedule a NAPI.
>>
>> But mlx4_eq_int() also fires a tasklet to service all items that were
>> queued via mlx4_add_cq_to_tasklet(), but this handler was not called
>> unless user cqe was handled.
>>
>> This is very confusing, as "mpstat -I SCPU ..." show huge number of
>> tasklet invocations.
>>
>> This patch saves this overhead, by carefully firing the tasklet directly
>> from mlx4_add_cq_to_tasklet(), removing four atomic operations per IRQ.
>>
So, in case of RDMA CQs, we add some per-CQE overhead of comparing the
list pointers and condition upon that. Maybe we could add an
invoke_tasklet boolean field on mlx4_cq and return its value from
mlx4_cq_completion.
That's way we could do invoke_tasklet |= mlx4_cq_completion(....);
Outside the while loop we could just
if (invoke_tasklet)
tasklet_schedule
Anyway, I guess that even with per-CQE overhead, the performance impact
here is pretty negligible - so I guess that's fine too :)
Powered by blists - more mailing lists