Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35608816rwd; Mon, 10 Jul 2023 09:47:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlFiMnB6bWRrP0wtpfuHiEQnkXZEtBWTbna8iba4H0svoVFg/mwM3dt866hBLzQv3vF+00/U X-Received: by 2002:a2e:a0d4:0:b0:2b5:89a6:c12b with SMTP id f20-20020a2ea0d4000000b002b589a6c12bmr10523822ljm.10.1689007642083; Mon, 10 Jul 2023 09:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689007642; cv=none; d=google.com; s=arc-20160816; b=Hn8IO6dcq2Ae2D2qo+tIpB4skrohoPn+IcAmL15eR8danLCIMjplNk4Yeo2V5Ty5K0 vX/SvpZ7Mavc9izzduXzGniVanTYIPjdDfL0GdjWu2Bf4pBuMI0hXOSaXjH0owXO+GpV Q/Wtjx/VKvzPA5GVHeWTE8JaBTTsHkvZ1XxYkob6I5cZa49SC531x84NFQc+qsn0paro 4edZ4WUeplMc6qAmoAGBkzPi0muRmT2N5DYAdt7gMWozAVHM2Jm0PUyZyV2QNF9hBMn+ Fomp0eDq/06u6RnYmjQ9PM3BoWPD9dx7+qP5ww7xR4KMrcOuj1yvbbDkjUXrkkalplGZ nOLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=LiSElVl1DSERcNfclKh+npPKjvok5tCTTaElTHtiwkU=; fh=1mpseLkGFXp1jGJr9QrS6J8xZJaGrNTaerrRbpi6Fog=; b=oT58BZSlDj0ijlx+8K3eWeF8siGUf/Oc/St0AqA5i52kttepErKhdT8QrYBJq4lGVG iBCACZhWCEoXjgOvbWx629y4COmX9l/f+5qHAQ/pp8mQueuUYxNAHj3RvYtTf/Y+2EtS zKeIcBJU7CEhs/PaLHHYXtpuGHVeJ5EWNgFqwkmP82S82b+YgRQXuAlNQI7Gf9urHOT5 U6AN90vLYOdKlZhIbqHRqAeHInVI0StVzNrOWLFC1bNtW6D6Rg6qleS4NmrMU5GcSScD vz/j33dR/nixOUaqF1tl3BtGKBuTjmEcdh/uBuzVpMrt0FAZeags7yRy/XYibWS+LoJF 4Wzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NwrmIjgT; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f27-20020a170906495b00b00992ad8595fdsi10086042ejt.464.2023.07.10.09.46.56; Mon, 10 Jul 2023 09:47:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@kernel.org header.s=k20201202 header.b=NwrmIjgT; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbjGJQmn (ORCPT + 99 others); Mon, 10 Jul 2023 12:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbjGJQmn (ORCPT ); Mon, 10 Jul 2023 12:42:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42328F2 for ; Mon, 10 Jul 2023 09:42:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CBE5461130 for ; Mon, 10 Jul 2023 16:42:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB499C433C8; Mon, 10 Jul 2023 16:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689007361; bh=bBt6O/veulsN6GYsmZXvg5NrlsLaQXmf+NnQFVN+eMI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=NwrmIjgTxVKP3WKIHVMJZM45cZyJSzT6bqI4eauf12aNc0tg+o/Oab80NHH+RYW9K /NgMdVscdr0NRN6Yo0uwObJu3HNhQRvQUKUAh7PFoc0UFYeMmYJIRRAwhpwwZ66oC9 9YP8wvHBmOwacCMq6c+Wbal1ORBgvByylM7devaljoBudU0z+MxUmtShuGXJMQYobw qLfClaKXw/D/9RXSahyVa62LbgvvEYsVWZiVHN61C1twbRd8BI8k1ad7Yi3lGebTWc fGqkvFUis6RSk7Ifc1x42KBsVnupL4JUCL/Bna4ljPlOCGoWqdJW/TYVPpfi1Ea7AK d0NKeSbeZCUCA== Subject: [PATCH v3 7/9] SUNRPC: Replace dprintk() call site in __svc_create() From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever , lorenzo@kernel.org, neilb@suse.de, jlayton@redhat.com, david@fromorbit.com Date: Mon, 10 Jul 2023 12:42:39 -0400 Message-ID: <168900735994.7514.15744992636137059327.stgit@manet.1015granger.net> In-Reply-To: <168900729243.7514.15141312295052254929.stgit@manet.1015granger.net> References: <168900729243.7514.15141312295052254929.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org From: Chuck Lever Done as part of converting SunRPC observability from printk-style to tracepoints. Signed-off-by: Chuck Lever --- include/trace/events/sunrpc.h | 23 +++++++++++++++++++++++ net/sunrpc/svc.c | 5 ++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 2e83887b58cd..60c8e03268d4 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -1918,6 +1918,29 @@ TRACE_EVENT(svc_stats_latency, __get_str(procedure), __entry->execute) ); +TRACE_EVENT(svc_pool_init, + TP_PROTO( + const struct svc_serv *serv, + const struct svc_pool *pool + ), + + TP_ARGS(serv, pool), + + TP_STRUCT__entry( + __string(name, serv->sv_name) + __field(int, pool_id) + ), + + TP_fast_assign( + __assign_str(name, serv->sv_name); + __entry->pool_id = pool->sp_id; + ), + + TP_printk("service=%s pool=%d", + __get_str(name), __entry->pool_id + ) +); + #define show_svc_xprt_flags(flags) \ __print_flags(flags, "|", \ { BIT(XPT_BUSY), "BUSY" }, \ diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index b02a672aaada..ad29df00b454 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -505,9 +505,6 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, for (i = 0; i < serv->sv_nrpools; i++) { struct svc_pool *pool = &serv->sv_pools[i]; - dprintk("svc: initialising pool %u for %s\n", - i, serv->sv_name); - pool->sp_id = i; INIT_LIST_HEAD(&pool->sp_sockets); INIT_LIST_HEAD(&pool->sp_all_threads); @@ -519,6 +516,8 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, percpu_counter_init(&pool->sp_threads_timedout, 0, GFP_KERNEL); percpu_counter_init(&pool->sp_threads_starved, 0, GFP_KERNEL); percpu_counter_init(&pool->sp_threads_no_work, 0, GFP_KERNEL); + + trace_svc_pool_init(serv, pool); } return serv;