Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21153616rwd; Thu, 29 Jun 2023 11:43:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5dKtJ3Z3CGzsdwYW8aff0cp6DTbruPWhfjQL5segLamwA/A817Kfsf4D1NMpB8YsoRhMFg X-Received: by 2002:a05:6a20:2daa:b0:105:6d0e:c046 with SMTP id bf42-20020a056a202daa00b001056d0ec046mr553832pzb.26.1688064199656; Thu, 29 Jun 2023 11:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688064199; cv=none; d=google.com; s=arc-20160816; b=cHSnH7FrMcJqgSJDJ8c7u6c/a4YmQpLdXxi9h3Byz14u7fAUnI4usYygUhVI05FHKv jS8FBvKLGXIH6mMP7pRX2QIPJe3lD6eURnpYiogO/nqIQ82pZCGCB2P1i04WXveYdtBw pqScnPKmfgmICWDyS/JBtmvplN27ewwD8UN5dRG1sDdt5u/DJ3O/zQsFxAjn9c0A79U8 pM6PAv6J4328kOg3mU0OyKPC7SqhU0i7MPXX83EO21Puq+HzzbhrIK0YWMP2dgRvgtjw vNmCI7afPAe4VSGJn+50NeAhMSUYBQZmGLzlmkGFqBGX6F13poUFkmrEHIWEje3wzVUX 82iA== 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=q2boHcLhh9b9i2LPghfIq6f5lbww0XvAQSRzQkl5obM=; fh=An0MVVPXmcTJNFrRZLpT7ZfNQmt2AI9hBye10HEz75U=; b=uU5Idsv16DTj3etO8cwX0FbP9vYZe8lrf93kKLNerfz9WtEht5HXIIkoO2flz4rgZV o59Hzun5ENdfLKC/3yKfGu91axqRjn2QRGB/XqOOeu3lcpwDmA+xlFcnFSTsRCXMvfjP +cfwosuD2lgFqAPwTsFO82maDd1pHE+YalcpZ0rjz8AviRTYTTOiClC4PdBK4TymcG9B TOd3NB00e2R+cNFvtFekiZNVXLUF63QKfnItcKeYXY89jaGfFJc+gm8KUrUMk24hq5/v ci9ZONxo1XsdbIyERTpsortmp6gMDCX7Jl0HrnTHSBowZC3XWbc2/Yb63p+5CtWxeSVb EV8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hF3kYUTD; 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 r18-20020a63e512000000b0054fe4cdd1a7si10777347pgh.716.2023.06.29.11.43.04; Thu, 29 Jun 2023 11:43:19 -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=hF3kYUTD; 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 S232819AbjF2SnB (ORCPT + 99 others); Thu, 29 Jun 2023 14:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232507AbjF2SnA (ORCPT ); Thu, 29 Jun 2023 14:43:00 -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 5BD222681 for ; Thu, 29 Jun 2023 11:42:59 -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 B94E7615E4 for ; Thu, 29 Jun 2023 18:42:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BABFAC433C8; Thu, 29 Jun 2023 18:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688064178; bh=LCNqZcxIVd1RO7ZlOOofBxJSB+d62egEMIvK6s5EX2c=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=hF3kYUTDZcMqcnqOWKC6JgSAhs8YpIZley9hZDcNmTONM3cS1U8TNhuSdMSYCRTch HxsEEXxyiQuKwwH1lcxYyaJQ+Ch7n/33KSn1bGfZFwk+Ihgm0cnR8hekVOLgUPyVMN N4MJOZ9YpHAvqwD8lqw7IjZY/yhTyilps8sox/E8EGPXgPi8Eb2RVa4/AdPEDwbslL 55TZzI/tjgdzLTW7hrd8WOqNlq3Ljk4s2CW/PkcgkjhUzIXczzt5kQ3dORIHDyPQ8O TKArG337X72EcOv3CT78fKDzcXYKANuofwYZgkbSaXbEp6871YwSP95cABZke1FZHW xT38mH1SmvYDA== Subject: [PATCH RFC 5/8] 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: Thu, 29 Jun 2023 14:42:56 -0400 Message-ID: <168806417679.1034990.17820560466387975643.stgit@morisot.1015granger.net> In-Reply-To: <168806401782.1034990.9686296943273298604.stgit@morisot.1015granger.net> References: <168806401782.1034990.9686296943273298604.stgit@morisot.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 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 cf3d404ca6d8..70f3bc22c429 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -1842,6 +1842,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 cf2e58ead35d..828d28883ea8 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); @@ -517,6 +514,8 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, percpu_counter_init(&pool->sp_threads_woken, 0, GFP_KERNEL); percpu_counter_init(&pool->sp_threads_timedout, 0, GFP_KERNEL); percpu_counter_init(&pool->sp_threads_starved, 0, GFP_KERNEL); + + trace_svc_pool_init(serv, pool); } return serv;