Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6849441rwb; Mon, 5 Dec 2022 19:35:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf699z1QDoB6pCKLskUTGBNKFWjhl7SrNab/Bj1pIgM7NKqsE4GFVrip0OsY2uV7WGygSPh5 X-Received: by 2002:a17:906:29c3:b0:7c0:e0db:f136 with SMTP id y3-20020a17090629c300b007c0e0dbf136mr8607164eje.333.1670297718795; Mon, 05 Dec 2022 19:35:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670297718; cv=none; d=google.com; s=arc-20160816; b=bxX6CUcdj6oLFJ45h4/p4iXUmgpXATjhGm5ZiSVodNvuaGgfgusZ7Ez4IShW5nfLs0 zhM0A+PvbYetGA5dDPilgXqY2ISEhQkGZSOHbfZy8gDRj0EAguF4Wa8q0+U/+1dwtQQA YXdru3HubKxi1KXDVjOxkLza21fRm17Uq5AuL8lfi5jGofNWIqM+Uq7zH51mBMNj3N8/ UYrs6BktM3mW1Wg3CRwAgMv6Vf2EBVZLt6Gq4Ta7VKn0qwRKNa+BEszMKecGgFHRzKVy 372x1lk9V/UI1bLMgriQxkx97qeY1/EZtecVlLazbOoT2OlUj7H/3Sr901zudvsqH2cl F3Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YqqT24Nqraytn2LOsrycTIcntZ7F2ktH5EjwHmBvNlU=; b=obTVPL4THB3wQkbQ13/QHIKzBL6nI/tl7FaDW2d59WiDJRebqfpcT1RU1y6Ew4/pkw 5kPweYug+lo8/BYuQRRU4FJv2Zvjf9a+Nc4oRzXE24zMDInGIFJc4Qzv/Kz7gX7A49M+ ca46FlpWAHOA7VhcRAJen2H/c98NZdIONI0/6QGjxxH5EebY01zxEZb/1ABUPheIGTbr 3N2I9t6zFiW4LuPgYY5Okx+o6cmPge0SIIou7YFzt8kZX3gXtHqBEu64HbejOciFEmhj m/sNgimsG+sD4Kb3gJSVPjVQ369QW3jENa205yAil1zALPSvIlGMxCFutmnWdDAYb71E 3sbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=f+X2wMIV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne1-20020a1709077b8100b00779f8e7ec5bsi14935661ejc.42.2022.12.05.19.34.59; Mon, 05 Dec 2022 19:35:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=f+X2wMIV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbiLFDS3 (ORCPT + 79 others); Mon, 5 Dec 2022 22:18:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbiLFDSV (ORCPT ); Mon, 5 Dec 2022 22:18:21 -0500 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB1B825C52 for ; Mon, 5 Dec 2022 19:18:19 -0800 (PST) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-3bfd998fa53so138874247b3.5 for ; Mon, 05 Dec 2022 19:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YqqT24Nqraytn2LOsrycTIcntZ7F2ktH5EjwHmBvNlU=; b=f+X2wMIVqjOCM2pvzHPFEQnlrwDChpuK1e//9A/nqpwNm4/ibClEfmz0chRI3MEAr/ puudyO91CXQY+k4AvVN/n5/WdqlX6H+rNcoWrSs62NW1+xg3YsEeR4Mos+uymbw8B6FO TLkghVyoa+KIy2t93LqnYzz3Jiqj6bb7OC5rt9A0oeAjIUTEcqTIvzlHq/qpxh0j7YG+ cHTc3auKyTWvO4HJJ3lqBxC7r89KueGKzQ0wlWtS9KF+FKGHqKzlbWJpkwXNO8biG3N5 F1x0wrPQcw1ls7R5Wlf4b8rAMnOa120IurcFpsi5VJg/ze2jSrRnlUathgqAzCszHAGQ 4rGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YqqT24Nqraytn2LOsrycTIcntZ7F2ktH5EjwHmBvNlU=; b=JSANmhLKHLtwns9WFfvbhqtALVh3d2kwVCanNgsp/O5EbC5zee0b1YOWydf+2tfn28 el7BKAFfuBt18dNgdFt/6WVW9Gn2H0mU0o/472re0OpAh3Ldtl66EUMaWkHcgWYqJQYA ztnSjUlW89RPhO3HNY95LD4hQZAENkgcg8QUxgpvhjJfSZszSfS/DpHXRMvXS+o7WvjI MfRQTpx8IPHQ+5rPvNub05zX8W+xuVVpRAqiT0kJIOAJ4xkwXcOBa3o8dwzs2KaETINg bkUQYd7n0kHBbucUYx+CC34TWKbA2WS7UHmINpMKIyMIEe4XtK47OS8DwGd8mBcjM7bY g/tw== X-Gm-Message-State: ANoB5pl9RXyP/Q8+kMBj051fSc3LrNHOpkfH+gCrQpHRvcGk/btFiDx/ WcDMkWZk+Kua07tacKOJ5btUsYkzEYdd1We/cUQxYw== X-Received: by 2002:a81:d87:0:b0:393:ab0b:5a31 with SMTP id 129-20020a810d87000000b00393ab0b5a31mr13277936ywn.55.1670296698705; Mon, 05 Dec 2022 19:18:18 -0800 (PST) MIME-Version: 1.0 References: <202212050936120314474@zte.com.cn> <20221205175354.3949c6bb@kernel.org> In-Reply-To: <20221205175354.3949c6bb@kernel.org> From: Eric Dumazet Date: Tue, 6 Dec 2022 04:18:07 +0100 Message-ID: Subject: Re: [PATCH linux-next v2] net: record times of netdev_budget exhausted To: Jakub Kicinski Cc: yang.yang29@zte.com.cn, davem@davemloft.net, pabeni@redhat.com, bigeasy@linutronix.de, imagedong@tencent.com, kuniyu@amazon.com, petrm@nvidia.com, liu3101@purdue.edu, wujianguo@chinatelecom.cn, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 6, 2022 at 2:53 AM Jakub Kicinski wrote: > > On Mon, 5 Dec 2022 09:36:12 +0800 (CST) yang.yang29@zte.com.cn wrote: > > A long time ago time_squeeze was used to only record netdev_budget > > exhausted[1]. Then we added netdev_budget_usecs to enable softirq > > tuning[2]. And when polling elapsed netdev_budget_usecs, it's also > > record by time_squeeze. > > For tuning netdev_budget and netdev_budget_usecs respectively, we'd > > better distinguish from netdev_budget exhausted and netdev_budget_usecs > > elapsed, so add budget_exhaust to record netdev_budget exhausted. > > > > [1] commit 1da177e4c3f4("Linux-2.6.12-rc2") > > [2] commit 7acf8a1e8a28("Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning") > > Same comments as on v1. Yes, and if we really want to track all these kinds of events the break caused by need_resched() in do_softirq would also need some monitoring. I feel that more granular tracing (did I say tracepoints) would be more useful.