[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1487169254.1311.15.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 15 Feb 2017 06:34:14 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Saeed Mahameed <saeedm@....mellanox.co.il>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Matan Barak <matanb@...lanox.com>, jackm@...lanox.com
Subject: Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary
On Wed, 2017-02-15 at 15:59 +0200, Saeed Mahameed wrote:
> can the tasklet run on a different core ?
No. tasklets are scheduled on local cpu, like softirqs in general.
They are not migrated, unless cpu is removed (hotplug)
>
> the point is that if the EQ is full of CQEs from different CQs you would
> do the " kick = list_empty(&tasklet_ctx->list);" test per empty CQ
> list rather than once at the end.
>
> in mlx4_en case, you have only two CQs on each EQ but in RoCE/IB you
> can have as many CQs as you want.
list_empty() before one list_add_tail() is a single instruction.
By doing this right before manipulating the list, it comes with a zero
cache line penalty.
While if you do it at the wrong place, it incurs one extra cache line
miss.
This extra tasklet invocations can cost 3 % of cpu cycles.
Powered by blists - more mailing lists