lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 20 Feb 2017 00:39:13 +0200
From:   Saeed Mahameed <saeedm@....mellanox.co.il>
To:     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>,
        Majd Dibbiny <majd@...lanox.com>,
        Matan Barak <matanb@...lanox.com>
Subject: Re: [PATCH net-next] mlx4: do not fire tasklet unless necessary

On Sat, Feb 18, 2017 at 4:46 AM, Eric Dumazet <eric.dumazet@...il.com> 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 <saeedm@...lanox.com>
>>
>> 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() by spin_lock()
>
> Not that I care, but you might be interested ;)
>

Sure we are !
we will take it from here :-).

Thank you Eric.

> Thanks.
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c
> index fa6d2354a0e910ee160863e3cbe21a512d77bf03..9dcac3a367425f2804e933842698c66685baf626 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/cq.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/cq.c
> @@ -79,13 +79,13 @@ void mlx4_cq_tasklet_cb(unsigned long data)
>                 tasklet_schedule(&ctx->task);
>  }
>
> +/* Called from hard irq handler */
>  static void mlx4_add_cq_to_tasklet(struct mlx4_cq *cq)
>  {
>         struct mlx4_eq_tasklet *tasklet_ctx = cq->tasklet_ctx.priv;
> -       unsigned long flags;
>         bool kick;
>
> -       spin_lock_irqsave(&tasklet_ctx->lock, flags);
> +       spin_lock(&tasklet_ctx->lock);
>         /* When migrating CQs between EQs will be implemented, please note
>          * that you need to sync this point. It is possible that
>          * while migrating a CQ, completions on the old EQs could
> @@ -98,7 +98,7 @@ static void mlx4_add_cq_to_tasklet(struct mlx4_cq *cq)
>                 if (kick)
>                         tasklet_schedule(&tasklet_ctx->task);
>         }
> -       spin_unlock_irqrestore(&tasklet_ctx->lock, flags);
> +       spin_unlock(&tasklet_ctx->lock);
>  }
>
>  void mlx4_cq_completion(struct mlx4_dev *dev, u32 cqn)
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ