Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27067317rwd; Mon, 3 Jul 2023 20:21:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlF/EzpJot7Hga6GFhd4G2lsmch8F2XDkUrPyz+f7DIWjpU353L6w5CX/qPQPHuDHRhMeHs+ X-Received: by 2002:a05:6359:61a:b0:131:b4c:b876 with SMTP id eh26-20020a056359061a00b001310b4cb876mr7376268rwb.1.1688440881077; Mon, 03 Jul 2023 20:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688440881; cv=none; d=google.com; s=arc-20160816; b=hYF5O3hZdlYykkG+a3kG/l91+EaXfX3rDfuOj76k0xRTlplzyuIk3Wdsy/JuhLC2iq t6OONOni1NA8raLNBZZ3pIrHHuNW2i8w/FAc8T3t+8/byJ89lAgemNRVfXxP1IrQPlP6 yzAq8qfz4mSpCRBzHLugqA/Ynb4g2rosEd+J/SjdN1c9pz/jcUiym9ez9PZjjImn3rzy bV7ccpmrsw+AnE1EdpiVqdY/201IakJU9c3AF48/FjmHCx0LeqHsmqXXKSIw6sUvxnlz vS+D8EwjAqqkWQTYO15M19v9xTyNWwndRNXNuKcQXoByZwdHkMF1YojHeJJ9NVCeeNxl iuTg== 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=//VBtrpwuh5XVGYr/OAhGjnlmDs8cg5fGO9KwlYP9sI=; fh=prpaJtz2kvK6JgUs4447rtm1pDQU9vyI1Km5GBTBT9o=; b=ipnGuJ+SrxJKo7B9EGJGs/zcV2tDE0I/w4aQo7/2REk4Nz6FpOMorxnMrQ81NwKAKt SqjN/Ub/wWws5qJDutnXIL8WWhTj/x7DVizY6/9BMzffOc8QdUgb1bfaw486X4PSTngm WZlRvpET9CbBjxo8xirMM3Wt7ilcfa1m00I9ojSpeCnNZ2ztK7++bTCkN4dKQrF1Vh5C RSFa8Pex2zUblyMUUWTUzT2R6qWHcalmRkcnB7OYEutafaGT3qH4v0OEZdVXjLNCZ6rq kZSGdadxymXG45qsBdg0G/hrDTP5YJIbSIuVipJfbN0Da6d8v5za9NLwecH4koIJZatD eF1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UHCs1kqM; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=F3LcOx9C; 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 c11-20020a63ef4b000000b00553d7157e83si19334557pgk.134.2023.07.03.20.20.59; Mon, 03 Jul 2023 20:21:21 -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=UHCs1kqM; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=F3LcOx9C; 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 S230028AbjGDCbF (ORCPT + 99 others); Mon, 3 Jul 2023 22:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbjGDCbF (ORCPT ); Mon, 3 Jul 2023 22:31:05 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BE1C184 for ; Mon, 3 Jul 2023 19:31:04 -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 DF35B2024A; Tue, 4 Jul 2023 02:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688437862; 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=//VBtrpwuh5XVGYr/OAhGjnlmDs8cg5fGO9KwlYP9sI=; b=UHCs1kqMqiCH3IEl9PSkO5pcm3GVzqqQJ2NU1LxH4zAy4GjLIR3UfxSAIC05Zmg4/hXX4Q ZFvvTTRc3Z5AsTHPmC2fFFa9sCW3rX19Ku+YBMfHdfSeiekAYzwObhm3x/CTObNWSiHpXX qWD7w7vSx6S1YdKI0dTpa7Zwe9qQkMU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688437862; 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=//VBtrpwuh5XVGYr/OAhGjnlmDs8cg5fGO9KwlYP9sI=; b=F3LcOx9CMwkZLZrwPR3k0PxajpWjXGaUm1FkmBocaQNYKdWunFlxQDQFvR0BPezLitBH7k Jl77VvEEj97oXSBw== 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 AF7C1133F7; Tue, 4 Jul 2023 02:31:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +zE+GGSEo2R8FQAAMHmgww (envelope-from ); Tue, 04 Jul 2023 02:31:00 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever" Cc: linux-nfs@vger.kernel.org, "Chuck Lever" , lorenzo@kernel.org, jlayton@redhat.com, david@fromorbit.com Subject: Re: [PATCH v2 4/9] SUNRPC: Count ingress RPC messages per svc_pool In-reply-to: References: <168842897573.139194.15893960758088950748.stgit@manet.1015granger.net>, <168842927591.139194.16920372497489479670.stgit@manet.1015granger.net>, <168843152047.8939.5788535164524204707@noble.neil.brown.name>, Date: Tue, 04 Jul 2023 12:30:57 +1000 Message-id: <168843785749.8939.9913705917013899427@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 Tue, 04 Jul 2023, Chuck Lever wrote: > On Tue, Jul 04, 2023 at 10:45:20AM +1000, NeilBrown wrote: > > On Tue, 04 Jul 2023, Chuck Lever wrote: > > > From: Chuck Lever > > > > > > To get a sense of the average number of transport enqueue operations > > > needed to process an incoming RPC message, re-use the "packets" pool > > > stat. Track the number of complete RPC messages processed by each > > > thread pool. > > > > If I understand this correctly, then I would say it differently. > > > > I think there are either zero or one transport enqueue operations for > > each incoming RPC message. Is that correct? So the average would be in > > (0,1]. > > Wouldn't it be more natural to talk about the average number of incoming > > RPC messages processed per enqueue operation? This would be typically > > be around 1 on a lightly loaded server and would climb up as things get > > busy. > > > > Was there a reason you wrote it the way around that you did? > > Yes: more than one enqueue is done per incoming RPC. For example, > svc_data_ready() enqueues, and so does svc_xprt_receive(). > > If the RPC requires more than one call to ->recvfrom() to complete > the receive operation, each one of those calls does an enqueue. > Ahhhh - that makes sense. Thanks. So its really that a number of transport enqueue operations are needed to *receive* the message. Once it is received, it is then processed with no more enqueuing. I was partly thrown by the fact that the series is mostly about the queue of threads, but this is about the queue of transports. I guess the more times a transport if queued, the more times a thread needs to be woken? Thanks, NeilBrown