Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-19 Thread Saeed Mahameed
On Sat, Feb 18, 2017 at 4:46 AM, Eric Dumazet wrote: > On Thu, 2017-02-16 at 07:30 -0800, Eric Dumazet wrote: >> On Thu, 2017-02-16 at 14:38 +0200, Saeed Mahameed wrote: >> >> > Acked-by: Saeed Mahameed >> >> Thanks for reviewing this Saeed ! > > Note that mlx4_add_cq_to_tasklet() is called from

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-19 Thread Saeed Mahameed
On Fri, Feb 17, 2017 at 1:13 AM, Eric Dumazet wrote: > On Thu, 2017-02-16 at 23:17 +0200, Saeed Mahameed wrote: > >> so i guess you are not busy polling .. and adaptive moderation decided >> to lower down >> rx-usecs for you, and you are looking to improve latency. >> >> > Interrupt moderation is

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-17 Thread Eric Dumazet
On Thu, 2017-02-16 at 07:30 -0800, Eric Dumazet wrote: > On Thu, 2017-02-16 at 14:38 +0200, Saeed Mahameed wrote: > > > Acked-by: Saeed Mahameed > > Thanks for reviewing this Saeed ! Note that mlx4_add_cq_to_tasklet() is called from hard irq context, so we could replace the spin_lock_irqsave()

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-17 Thread David Miller
From: Eric Dumazet Date: Fri, 10 Feb 2017 04:27:58 -0800 > From: Eric Dumazet > > 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 > que

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Eric Dumazet
On Thu, 2017-02-16 at 23:17 +0200, Saeed Mahameed wrote: > so i guess you are not busy polling .. and adaptive moderation decided > to lower down > rx-usecs for you, and you are looking to improve latency. > > > Interrupt moderation is a latency killer, we want our usec back. > > > > well, for R

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Saeed Mahameed
On Thu, Feb 16, 2017 at 5:49 PM, Eric Dumazet wrote: > On Thu, 2017-02-16 at 14:44 +0200, Saeed Mahameed wrote: >> On Wed, Feb 15, 2017 at 4:04 PM, Eric Dumazet wrote: >> > On Wed, 2017-02-15 at 05:29 -0800, Eric Dumazet wrote: >> > >> >> >> >> mlx4_eq_int() is a hard irq handler. >> >> >> >> How

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Eric Dumazet
On Thu, 2017-02-16 at 14:44 +0200, Saeed Mahameed wrote: > On Wed, Feb 15, 2017 at 4:04 PM, Eric Dumazet wrote: > > On Wed, 2017-02-15 at 05:29 -0800, Eric Dumazet wrote: > > > >> > >> mlx4_eq_int() is a hard irq handler. > >> > >> How a tasklet could run in the middle of it ? > >> > >> A tasklet

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Eric Dumazet
On Thu, 2017-02-16 at 14:38 +0200, Saeed Mahameed wrote: > Acked-by: Saeed Mahameed Thanks for reviewing this Saeed !

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Saeed Mahameed
On Wed, Feb 15, 2017 at 4:04 PM, Eric Dumazet wrote: > On Wed, 2017-02-15 at 05:29 -0800, Eric Dumazet wrote: > >> >> mlx4_eq_int() is a hard irq handler. >> >> How a tasklet could run in the middle of it ? >> >> A tasklet is a softirq handler. > > Speaking of mlx4_eq_int() , 50% of cycles are spe

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Saeed Mahameed
On Fri, Feb 10, 2017 at 2:27 PM, Eric Dumazet wrote: > From: Eric Dumazet > > 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

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-16 Thread Saeed Mahameed
On Wed, Feb 15, 2017 at 5:26 PM, Eric Dumazet wrote: > On Wed, 2017-02-15 at 16:52 +0200, Matan Barak (External) wrote: > >> 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 mlx

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Eric Dumazet
On Wed, 2017-02-15 at 16:52 +0200, Matan Barak (External) wrote: > 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. > Th

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Matan Barak (External)
On 15/02/2017 13:10, Saeed Mahameed wrote: On Fri, Feb 10, 2017 at 2:27 PM, Eric Dumazet wrote: From: Eric Dumazet 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 serv

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Eric Dumazet
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

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Eric Dumazet
On Wed, 2017-02-15 at 05:29 -0800, Eric Dumazet wrote: > > mlx4_eq_int() is a hard irq handler. > > How a tasklet could run in the middle of it ? > > A tasklet is a softirq handler. Speaking of mlx4_eq_int() , 50% of cycles are spent on mb() (mfence) in eq_set_ci() I wonder why this very expe

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Saeed Mahameed
On Wed, Feb 15, 2017 at 3:29 PM, Eric Dumazet wrote: > On Wed, 2017-02-15 at 13:10 +0200, Saeed Mahameed wrote: >> On Fri, Feb 10, 2017 at 2:27 PM, Eric Dumazet wrote: >> > From: Eric Dumazet >> > >> > All rx and rx netdev interrupts are handled by respectively >> > by mlx4_en_rx_irq() and mlx4_

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Eric Dumazet
On Wed, 2017-02-15 at 13:10 +0200, Saeed Mahameed wrote: > On Fri, Feb 10, 2017 at 2:27 PM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > 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

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-15 Thread Saeed Mahameed
On Fri, Feb 10, 2017 at 2:27 PM, Eric Dumazet wrote: > From: Eric Dumazet > > 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

Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

2017-02-14 Thread David Miller
From: Eric Dumazet Date: Fri, 10 Feb 2017 04:27:58 -0800 > From: Eric Dumazet > > 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 > que