Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8832935rwp; Wed, 19 Jul 2023 16:29:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlGiu6WehSAViDusajccfBt7tMglVp096+HcE312vmdKDuRhpCu/my0r/RacZXwcUbDu1Jor X-Received: by 2002:a17:903:1205:b0:1b9:e972:134d with SMTP id l5-20020a170903120500b001b9e972134dmr18242007plh.3.1689809383014; Wed, 19 Jul 2023 16:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689809382; cv=none; d=google.com; s=arc-20160816; b=xI1fMfffTqfuc92uPvAzBvhmW1s7VR4ehdoEiE7Wt2N+RijwbKZeViNPaC1AGc9kBR PNekT6MKdf7tgAFcPf2gugQFkBuYcTMLegiDWl+42CvbRDpFd9glPaFgMlTGnoXspAIm T09b9Pwz+gtVWr3l9+ukp95rguPFVxg59CnZhIuuqECRKYB9fLGt6WyccZFpsQOaFuSG Pokg7XpR5VVtBqti9FLnt+xaaiAixujyGTqrlGuf744lw4Drm0EjhqbwRxsFCUvIb9WQ QHVOrK0E4tAyvVRCJr1o0YlQYF/3661oynPB0/r4nH4mbyu8xeTq79BNhMO6VGqjRMf+ Cw8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=4b1vBg50KuKttMWwDL5XRNrYR5tS1+N2W1FVh3mAhv4=; fh=7DFDo8ihEnRe7Y1piThtvtGXetlWVmAb71I1HziHbR8=; b=ZCLxPXljYfmqnSwfqDwHIGSW0s2izoTtoK8gcCE8T2SgE/wXTCBbBZ4k/GQpyn5vzm 1wvcft0n/SYWANPJZZrGLb4yNdh1UlQvKr0nlKPUy2ReM6FjvGZWLdX8udubf9odzQdT na3U3tBa5n2mPpD8Cb78s7zps/fo1Oq2gjmXyYzCt3xGzGCklt8ROZ5rYsRpKHatLQOT N9799qpnb60DWDOxbnBzmBxA3z6ck4jOj36Q2Jpm5S84S9qeOzbXP9JJSCuG+SJHZexK orTOJcuy/GwwcX6/L/uZs4Vl1yLLBDzrteHdgL52TBxf7Vx5xMGBF+bdSKrHjxkfuESK TIEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eXw2UJEA; dkim=neutral (no key) header.i=@suse.de header.b="4UMCn/BH"; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a17090332c300b001b89b63b877si4584670plr.446.2023.07.19.16.29.20; Wed, 19 Jul 2023 16:29:42 -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=@suse.de header.s=susede2_rsa header.b=eXw2UJEA; dkim=neutral (no key) header.i=@suse.de header.b="4UMCn/BH"; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229475AbjGSXUg (ORCPT + 99 others); Wed, 19 Jul 2023 19:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjGSXUf (ORCPT ); Wed, 19 Jul 2023 19:20:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03520E53 for ; Wed, 19 Jul 2023 16:20:30 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 99C362024F; Wed, 19 Jul 2023 23:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689808824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4b1vBg50KuKttMWwDL5XRNrYR5tS1+N2W1FVh3mAhv4=; b=eXw2UJEANrHhWwEqTtmIttMaB/8sGznULQ1bF9QrsPIKS1gxVRCSx+F+c8Y9TGJzSx7R2c y+dvvo9o87yvU5qQvlwhCeagti2AehlLnkfeLyrpmCuT8Jfn95cAouUnLp6C2cG+nksRNB YA464z+Tcq8p1tlLbLwo49hld8Tlaro= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689808824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4b1vBg50KuKttMWwDL5XRNrYR5tS1+N2W1FVh3mAhv4=; b=4UMCn/BHPZXuT4YadcTOCiDPGMcIzzZELJMB5VTXZriOpYSGvhmft9sk3+ZBaH4TPJTdPI 1vkstYwuycF4wnBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 145D313460; Wed, 19 Jul 2023 23:20:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id T9tuLrZvuGSWPQAAMHmgww (envelope-from ); Wed, 19 Jul 2023 23:20:22 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever III" Cc: "Chuck Lever" , "Jeff Layton" , "Linux NFS Mailing List" Subject: Re: [PATCH 10/14] SUNRPC: change svc_pool_wake_idle_thread() to return nothing. In-reply-to: <9EEE82A6-6D25-4939-A4F5-BAC8E9986FF3@oracle.com> References: <168966227838.11075.2974227708495338626.stgit@noble.brown>, <168966228866.11075.18415964365983945832.stgit@noble.brown>, , <168972938409.11078.8409356274248659649@noble.neil.brown.name>, <9EEE82A6-6D25-4939-A4F5-BAC8E9986FF3@oracle.com> Date: Thu, 20 Jul 2023 09:20:18 +1000 Message-id: <168980881867.11078.6059884952065090216@noble.neil.brown.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Wed, 19 Jul 2023, Chuck Lever III wrote: > > > On Jul 18, 2023, at 9:16 PM, NeilBrown wrote: > > > > On Tue, 18 Jul 2023, Chuck Lever wrote: > >> On Tue, Jul 18, 2023 at 04:38:08PM +1000, NeilBrown wrote: > >>> No callers of svc_pool_wake_idle_thread() care which thread was woken - > >>> except one that wants to trace the wakeup. For now we drop that > >>> tracepoint. > >> > >> That's an important tracepoint, IMO. > >> > >> It might be better to have svc_pool_wake_idle_thread() return void > >> right from it's introduction, and move the tracepoint into that > >> function. I can do that and respin if you agree. > > > > Mostly I agree. > > > > It isn't clear to me how you would handle trace_svc_xprt_enqueue(), > > as there would be no code that can see both the trigger xprt, and the > > woken rqst. > > > > I also wonder if having the trace point when the wake-up is requested > > makes any sense, as there is no guarantee that thread with handle that > > xprt. > > > > Maybe the trace point should report when the xprt is dequeued. i.e. > > maybe trace_svc_pool_awoken() should report the pid, and we could have > > trace_svc_xprt_enqueue() only report the xprt, not the rqst. > > I'll come up with something that rearranges the tracepoints so that > svc_pool_wake_idle_thread() can return void. My current draft code has svc_pool_wake_idle_thread() returning bool - if it found something to wake up - purely for logging. I think it is worth logging whether an event triggered a wake up or not, and which event did that. I'm less you that the pid is relevant. But as you say - this will probably become clearer as the code settles down. Thanks, NeilBrown > > svc_pool_wake_idle_thread() can save the waker's PID in svc_rqst > somewhere, for example. The dequeue tracepoint can then report that > (if it's still interesting when we're all done with this work). > > > -- > Chuck Lever > > >