From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC80BC169C4 for ; Thu, 7 Feb 2019 00:56:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A1DB217F9 for ; Thu, 7 Feb 2019 00:56:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=dev-mellanox-co-il.20150623.gappssmtp.com header.i=@dev-mellanox-co-il.20150623.gappssmtp.com header.b="Uw4z9vi6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbfBGA4j (ORCPT ); Wed, 6 Feb 2019 19:56:39 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38563 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfBGA4i (ORCPT ); Wed, 6 Feb 2019 19:56:38 -0500 Received: by mail-lj1-f194.google.com with SMTP id c19-v6so7825901lja.5 for ; Wed, 06 Feb 2019 16:56:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c57t/m1rOW1hxD54LBIs6QbXdthjsO7EAcKubDF/k3o=; b=Uw4z9vi6KZ0Wxq1H4CVuDFWyyNaj/FSjq9UeFukumOOZl9naav6YoVJieP3JDpK+Pl AoC1URwilfbZByYyv56MTAvsDe8NMpKxCOaGYb48wVCGGvwWy+P5bo4/0WSFb3I2eAd3 sqTp19yHEw0/42hR4ffFLvVV3nWZ/Wp1YHnOVvfV4T+REx4xwSoi/R8rbGtigNB7aTg7 I1ePhZ+Hr7zOF5z7fGwIXst0B0cXMBiKapiVQJJs053wBROKla/7LG7lnctgvO+i7I9x VctQtQ23J4bXXINbHkN6qEqt46uqCF9Et6kyMkQnBQWG0oVRCwxMwKOm0K5CNmoRirH6 dapA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c57t/m1rOW1hxD54LBIs6QbXdthjsO7EAcKubDF/k3o=; b=OOe+D6+yLex9kZUe/B5tgf6HzWKL3pW1F4xc3zlPtQB88eWD0WikpKmWl9F/XA/p2N HCiSufGKYE1A14z4ey5aRTZGnuGAgywDCWKRnNMYBYgEt77zqggKaUHRAMgFPblWA+Wn s9PS7hjzwu3m1aiwcBmejZMqzpuBgSoctGz76CyGPbWaiPV2iDbjghYWBIOoKklbd6Su zG+hvzp03VrDjLoxDijxAkhJNsumkoM84mb1Cc+Bhrz3WZ9MGRzCgQoD29swTRDtZTt4 01ddJYKblcbP7WvyAHFO/tjKh07646YyvWOI0CjgRSskBP1Ri84RDbtC1hApwjAaaKtw 9pYw== X-Gm-Message-State: AHQUAubbT52myNNxp+m6wBnz4/485qoPczWDivrP+FZyjVM+Oq0a7dsq k6CSgvIpR14m4LikuS6YZLZC6+n0XNAoF/hWVpvXMg== X-Google-Smtp-Source: AHgI3IYNH5+kRmgQZnJxGtf2iNp2q03VjSUX058JAyuNKlhv3uQZrXdrgd9Ic2/TPMQTK1vfHrYIinmhG9cOs4sOQaU= X-Received: by 2002:a2e:858e:: with SMTP id b14-v6mr287576lji.43.1549500996704; Wed, 06 Feb 2019 16:56:36 -0800 (PST) MIME-Version: 1.0 References: <20190206230019.1303-1-xiyou.wangcong@gmail.com> <52ed9806-310d-bfeb-9610-0daefc1e66fa@gmail.com> In-Reply-To: From: Saeed Mahameed Date: Wed, 6 Feb 2019 16:56:25 -0800 Message-ID: Subject: Re: [Patch net-next v2] mlx5: use RCU lock in mlx5_eq_cq_get() To: Cong Wang Cc: Eric Dumazet , Linux Kernel Network Developers , Saeed Mahameed , Tariq Toukan Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Feb 6, 2019 at 4:53 PM Cong Wang wrote: > > On Wed, Feb 6, 2019 at 4:28 PM Eric Dumazet wrote: > > > > > > > > On 02/06/2019 04:04 PM, Cong Wang wrote: > > > > > synchronize_irq() is called before mlx5_cq_put(), so I don't > > > see why readers could get 0 refcnt. > > > > Then the more reasons to get rid of the refcount increment/decrement completely ... > > > > Technically, even the rcu_read_lock() and rcu_read_unlock() are not needed, > > since synchronize_irq() is enough. > > Excellent point. > > For the refcnt, I am afraid we still have to hold refcnt for the tasklet, > mlx5_cq_tasklet_cb. But yeah, should be safe to remove from IRQ > path. the tasklet path is for rdma CQs only, netdev cqs handling will be refcnt free.