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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 1A1E9C433DB for ; Tue, 12 Jan 2021 13:45:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA42022228 for ; Tue, 12 Jan 2021 13:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389273AbhALNpD (ORCPT ); Tue, 12 Jan 2021 08:45:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389017AbhALNo5 (ORCPT ); Tue, 12 Jan 2021 08:44:57 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60108C061575 for ; Tue, 12 Jan 2021 05:44:14 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id 6so3591571ejz.5 for ; Tue, 12 Jan 2021 05:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DggcAzaHrg9qcG/KEgarh9Ma3/As3Zhva7TDZfvS75Y=; b=tMLoMhpm3041nZeKJ3MNyTJmesBxx3i50iHgEXPmF7MwfT/K9LkXyowTNlHWaPLm/2 TeE32jSEFhOeqtywz1uX6kdIe53+0hDW2arkcKr4j45ww33ue/Hp2ou/8j/+XguBB4PV 0behYrRJD/kWYPFxV4x5sY5BO/UX2dxlOKF/bqdiflqvsde6/tc59ONtYCFwWQZLTWTJ KuDEpXqDX3Vi0yxQuVg03dVJRXS0WBm74ESOQePQGtU9hyIiFAfTx1p9g4K4P+N5FoSu 4JRQ933lDfUuHaqZPlUN3O9kfBQuHcEbuqyS0TVRSfafSJQru/D6O2mjFJ7/R+1cAEcG gMdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DggcAzaHrg9qcG/KEgarh9Ma3/As3Zhva7TDZfvS75Y=; b=p/QzJI+mrlBYk5epbUqAaE3plhr3hA3ik/mz9HK3iHTF+KY80V88gTxnThv6kcGj4s sgY5NAYostrjbYIOqD8qinAgTWwAjui6XcBmag7cOzcVEmFQ1mZTV+syALAxSC8v3dMG hiHf+TxkS1uKjCJFp524EYcNyySI4BlrkAjs/rTYM3Ouu+SMSDG5PUhkVsfvPQO3IGLp 1+VPBK0eJ8oyR1C0zwDF9SyQLzU2bQYz0WxnJ2KubZY/h0QiUUHwLa/vWbHtrzrxNoAD vSARQTegdkQuoI5TgQ3/4qRnFbzQ9zPcDDCqXWe5Ff+QTFIw+BrCm+itYjgi7NXLdKtf Iz8w== X-Gm-Message-State: AOAM532vZuUHs02NV1yuX5JPtukt7nY6KiQluifc2FJlRzHqvRKAgzeY ruhEf2PGgyRq5UoJZgG4THc= X-Google-Smtp-Source: ABdhPJyBC3kynXECbal1GjqyWvfbKNUaGG/dyLC3eFGX2k1LqjgBM2+VKbodomnOQoOlxitMBxZ/tw== X-Received: by 2002:a17:906:dfd5:: with SMTP id jt21mr3277313ejc.519.1610459053070; Tue, 12 Jan 2021 05:44:13 -0800 (PST) Received: from skbuf (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id r11sm1447960edt.58.2021.01.12.05.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 05:44:12 -0800 (PST) Date: Tue, 12 Jan 2021 15:44:10 +0200 From: Vladimir Oltean To: Saeed Mahameed Cc: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , Cong Wang , Stephen Hemminger , Eric Dumazet , George McCollister , Oleksij Rempel , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , Arnd Bergmann , Taehee Yoo , Jiri Pirko , Florian Westphal , Nikolay Aleksandrov , Pravin B Shelar , Sridhar Samudrala Subject: Re: [PATCH v6 net-next 03/15] net: procfs: hold netif_lists_lock when retrieving device statistics Message-ID: <20210112134410.pr5lqv4hcxe3dxfy@skbuf> References: <20210109172624.2028156-1-olteanv@gmail.com> <20210109172624.2028156-4-olteanv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Jan 11, 2021 at 03:46:32PM -0800, Saeed Mahameed wrote: > This can be very costly, holding a mutex while traversing the whole > netedv lists and reading their stats, we need to at least allow > multiple readers to enter as it was before, so maybe you want to use > rw_semaphore instead of the mutex. > > or just have a unified approach of rcu+refcnt/dev_hold as you did for > bonding and failover patches #13..#14, I used the same approach to > achieve the same for sysfs and procfs more than 2 years ago, you are > welcome to use my patches: > https://lore.kernel.org/netdev/4cc44e85-cb5e-502c-30f3-c6ea564fe9ac@gmail.com/ Ok, what mail address do you want me to keep for your sign off?