Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1740961rdb; Mon, 9 Oct 2023 00:54:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBZKkXqmb4bsd/iYX6+uu1IMyN62TVsPgGJMS/uCuWByfHWOIGrf/c17SoYz8JbSuyLPYg X-Received: by 2002:a81:4eca:0:b0:583:d6bb:4e96 with SMTP id c193-20020a814eca000000b00583d6bb4e96mr15974484ywb.8.1696838063419; Mon, 09 Oct 2023 00:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696838063; cv=none; d=google.com; s=arc-20160816; b=FCQJk0v5u1llYE9mpx6SLloWbzwWak1mIckqqT062wl4EptTjEUYFsJHSJ6fOI2D+m 1Dxox7+p14DyVZ68qNyZKP//93pe7bkfAB6P/F2+o9xQpHZZx6U00a67mjQ9Ij8qC4rq pGOj2VHFC7xXas5/DEcC1LpwFSpWmY8Ry4Ud7Mxa2Bub18UQJ7dtUX7KAIsTpsNYq2zw M6S4PEsg0F6JXedhGPVjPhwOKQXBn0p5kJdwdrA77+sook7dmHq8LAGngZCyT0oc0HJq V6UUL62KzXwXl2CaShrVCfsKfzf+fWeaFno0n+j1pxQesdECly/qImrUPCtsKmIOtJdf VLlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=h352FGx59vcioNapcninHN6AK5Dc534x0lC4Q9q6E4Q=; fh=8xX4niJBvP+5kifGVORVhDkmpwdDoSH/1ALEaCGwu6w=; b=NAKX5dhSIWF+9+WJryzHZhX0HF2X6cc5mowoLcoGfzxrjW7f+0WYEIjtjLcXZuOi9K 6+WE2H2bg6A6LPXgjGpchF067palfaKtu0aqw0Pk7CsCkUo4b7hzxb2kfROylVbzG0XW pi5FlqMPWQkHg258HVPT374153/q9v9UPml5sWfavBjEN3qfDRmP8zuk4FlW+8xqQaUD 944159CGlBFb9a06XRzvcwNlWt3prcAZ3WgV/1mva+k8CuEcncxJMkTjsLLrjAxLv6Xl 7FhwU5RFGluTikGUJOrrKsdf0PhqgfLxjg+DfiP1EI6/ZRHTkZjBRNc5WTEYDfztypXo R5AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=J6sWnabb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id l184-20020a6388c1000000b00563f8e3fca8si9330129pgd.49.2023.10.09.00.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 00:54:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=J6sWnabb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 440D480A223D; Mon, 9 Oct 2023 00:54:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345450AbjJIHyJ (ORCPT + 99 others); Mon, 9 Oct 2023 03:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234371AbjJIHyH (ORCPT ); Mon, 9 Oct 2023 03:54:07 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9581FA6 for ; Mon, 9 Oct 2023 00:54:06 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51e24210395so11991a12.0 for ; Mon, 09 Oct 2023 00:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696838045; x=1697442845; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=h352FGx59vcioNapcninHN6AK5Dc534x0lC4Q9q6E4Q=; b=J6sWnabbfhIfnvC9Y0di8LroKCpamvLD1hZiq2r7M7wczIaaoXJpCF8GLQFtp23FhF LqT02YiTzd7amFELoJS+bgMdWGSigHwfITw24gVzw9hmPlsGQ2IHvXGA2X3su+pq9lOy U8PUn1ifJYG8JfwgZ296jnPERQ7MOB4J6BPyYx/kp4Hwz7UgnQKv/6lLB1XCZAG1yD4v 6vPK5MH5Kh0MuY/HgCS8fPbm7WELF1jtF9E3953fwWlaJnOiF9t/jsMPdLlmOjXC3Uul ye7V0SnXbmTzsYJJR2SL80+1vxJfE8LkwU7HujahiMRBPEshUbRBgq9Go3boNXz+lyy7 SyvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696838045; x=1697442845; h=content-transfer-encoding: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=h352FGx59vcioNapcninHN6AK5Dc534x0lC4Q9q6E4Q=; b=EfUrVTd9MITIEN/Lu/ICgswXFmGTF6F8AysrUexQlciZo7q+jtdwC8qmHUzIsJpY/1 N1OkYJMkRNuuaGM/kisegFU2FmoKmEbCXMlWFovclIq2Vh0WK5osPoqTOsVLtirs7gTk n1fhyQ4wSP8d4j5ybMgYuw28MSl2oFmpT7oo5xM8fnkV7zB82peZeKotsEq4BfatKCxp KEaCBvnBD++wF1iU3p3iO09I3YfPxI3fTJ5wlYWlWakDjinAYkqwWRiSrR+AVAhxb6U8 YbBpdmJX5a8uCGITRQRH76SPCI5FDB1hswIb39Bhml+E3kxu/ggb1k+2IAL+0fP5tVqB 2Tyw== X-Gm-Message-State: AOJu0Yx4n+Wr9R0u9vEE0zc4lhX93WYroWCbsAuC+d1rkUQ12CFD31W/ LZn4fklDmyiIFG5/tJy509kfB0rF6uxnhyqu3OH8cQ== X-Received: by 2002:a05:6402:d4b:b0:53a:ff83:6123 with SMTP id ec11-20020a0564020d4b00b0053aff836123mr195876edb.3.1696838044799; Mon, 09 Oct 2023 00:54:04 -0700 (PDT) MIME-Version: 1.0 References: <20231007050621.1706331-1-yajun.deng@linux.dev> <917708b5-cb86-f233-e878-9233c4e6c707@linux.dev> <9f4fb613-d63f-9b86-fe92-11bf4dfb7275@linux.dev> <4a747fda-2bb9-4231-66d6-31306184eec2@linux.dev> <814b5598-5284-9558-8f56-12a6f7a67187@linux.dev> In-Reply-To: <814b5598-5284-9558-8f56-12a6f7a67187@linux.dev> From: Eric Dumazet Date: Mon, 9 Oct 2023 09:53:51 +0200 Message-ID: Subject: Re: [PATCH net-next v7] net/core: Introduce netdev_core_stats_inc() To: Yajun Deng Cc: rostedt@goodmis.org, mhiramat@kernel.org, dennis@kernel.org, tj@kernel.org, cl@linux.com, mark.rutland@arm.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Lobakin , linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 09 Oct 2023 00:54:20 -0700 (PDT) On Mon, Oct 9, 2023 at 5:07=E2=80=AFAM Yajun Deng wr= ote: > 'this_cpu_read + this_cpu_write' and 'pr_info + this_cpu_inc' will make > the trace work well. > > They all have 'pop' instructions in them. This may be the key to making > the trace work well. > > Hi all, > > I need your help on percpu and ftrace. > I do not think you made sure netdev_core_stats_inc() was never inlined. Adding more code in it is simply changing how the compiler decides to inline or not.