Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9841518rwd; Wed, 21 Jun 2023 12:35:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CDMEVT7MgLKnmH7lS94s38Ossae1Z8U7C6Tq4AF/F1ex6eN+k/WM7D8PWf0R3JBjHe7vO X-Received: by 2002:a17:902:e807:b0:1b3:d33f:917 with SMTP id u7-20020a170902e80700b001b3d33f0917mr14356175plg.49.1687376137414; Wed, 21 Jun 2023 12:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687376137; cv=none; d=google.com; s=arc-20160816; b=jL0zhtjEVBeEGBTBuAwuPGvhPcAf1qiny+x2pTZUDmpCpVor92ofWIROV4pyPwmLvd vdhg6c/GwjWjbhS+BJieU9JqzUxhPsnCGxCh962nKTKtck8p0LRfcLSWwnTgLgG5LmrH CHTzeVlFOenHuBEO93jW2rAvIKtEnRWv2WfpkIEXxf7cKpF8hY7y/gTfw7KwrAaKNLxJ YBFc6wgeyV5NuABR9u2uABqr9dpNmEeFtY+khWYX1o37gq71SucyNOBtrZSht+NQ5Tx6 bWtBQFpnBsAzLPL1Vy7n4lMIyybgv1VAHWRECc1l5hmDaOjMM2fBUM8WaxFjrgnrunlN LWrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=K4yDK3apM1izDT0cLLYrUN8q998jyQn5sT5zUG3gz6E=; b=MpqdQGqqdLCzRpBl0THaF/lqbqovupsapZuw++3jpSR1RXIXdZ70cjXMBgghWDzCIH Mj6q37hZe1s8dmJeTwjRVdNYqXc0P2fl8k4O+klVSwq1DFlg75uPwVjAvthvDmg2KL5o KHlVhNNXBV2/905+ELn1qt2ItzqiaJuoxYqak9ubIZ8X2eUY9wFqekiTdF9RiKXamg2a 8fstZO5T2PmyrgUVK4Z56CEcmBx059YnO4CvCEArjkkwO5cYpQPSyr6PdNcRqki8CQic iHn7/LhcNlGh/IXMr1ZGl/yMnCx98devyN8XqJe5f63HXOvsnusTVN8WC9Jdoa4svb0Y EYsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=VgxVIHC+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 x3-20020a170902fe8300b001aaf2ced278si1435603plm.430.2023.06.21.12.35.24; Wed, 21 Jun 2023 12:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20221208 header.b=VgxVIHC+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S230515AbjFUTRE (ORCPT + 99 others); Wed, 21 Jun 2023 15:17:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbjFUTQ6 (ORCPT ); Wed, 21 Jun 2023 15:16:58 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1F56199E for ; Wed, 21 Jun 2023 12:16:38 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-34207e81c98so30435485ab.2 for ; Wed, 21 Jun 2023 12:16:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687374998; x=1689966998; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=K4yDK3apM1izDT0cLLYrUN8q998jyQn5sT5zUG3gz6E=; b=VgxVIHC+B3BaDo0HS8AgvrP4ASYhEntLBRLHvK8GFSQ7sq9Hdy610WPKyG6jCmlqv3 3zVQZ0HRK9CtZ48RSlahXiiEIfIPpGJ4Wx3E+eOcAyPlLhZe01gmeTV3o9238e/XjGPL 80vHuE0yZ0aZrWr4bAAFWHhkLisGMECfpJbNyWNAEi68pzOpiwzIgI4fDuXn7DiYtxLl MeiGdglzorgdtXqVc2rhaTbaqLr2sJncs3VlDt9BlntVgIChgE+8IFOLD4y8p3nUOSaT ePl9rvgbkbkrKtw9R/15x+p1sj4IxnHwHrT+84bE/oHlj3yV8SFDIH3oqPhyoNhS0Dkz c5ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687374998; x=1689966998; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K4yDK3apM1izDT0cLLYrUN8q998jyQn5sT5zUG3gz6E=; b=PSQgdKhFfjpYr2kGK6nvuiUEtRxaAIBJPJCP7VFdx/eHjBWhBDguPSAmpb4P/xT/Vr nkEjIkCxzaA8fWSG5tTShueVQCVfTosC71R9Ij6FxFIB9Q6ZrFTtKIPFsSEnG1LMUsa5 VuidKc+iBGqGxsVJ5z+pMi1u886g2VzTwit8eB2YunG0nAy6cRHHIky2AmRYbsiXpPJC Ghj2LrR4BWBNW+9K1owr7K2JIoRtrHacizi/Xd2cXHLOdSWz7LqFBF47mrv4jfZhCtm4 VYCxOqgqClVxfI2y8MCvvE4gvqo9MjAik0A1lBtHH0CgFoh/H7DugcrMaRExjMCaCN8i LgJg== X-Gm-Message-State: AC+VfDwtpGH2KKIw1XybswWw56qXnEh/pgZ0px3UdSxc0YeQXhdXGVZj bAk0enTawT/EervW5GEcJRkb4P//PKXCZA== X-Received: by 2002:a05:6e02:5c5:b0:339:f011:77f5 with SMTP id l5-20020a056e0205c500b00339f01177f5mr16085986ils.12.1687374997909; Wed, 21 Jun 2023 12:16:37 -0700 (PDT) Received: from localhost (dhcp-72-235-13-41.hawaiiantel.net. [72.235.13.41]) by smtp.gmail.com with ESMTPSA id c10-20020a92cf4a000000b0033e6414ec9bsm1500652ilr.62.2023.06.21.12.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 12:16:37 -0700 (PDT) Sender: Tejun Heo Date: Wed, 21 Jun 2023 09:16:35 -1000 From: Tejun Heo To: Pin-yen Lin Cc: Brian Norris , jiangshanlai@gmail.com, torvalds@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, joshdon@google.com, brho@google.com, nhuck@google.com, agk@redhat.com, snitzer@kernel.org, void@manifault.com Subject: Re: [PATCHSET v1 wq/for-6.5] workqueue: Improve unbound workqueue execution locality Message-ID: References: <20230519001709.2563-1-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org Hello, Pin-yen. On Tue, Jun 13, 2023 at 05:26:48PM +0800, Pin-yen Lin wrote: ... > > 1. affinity_scope = cache, affinity_strict = 1 > > > > 2. affinity_scope = cpu, affinity_strict = 0 > > > > 3. affinity_scope = cpu, affinity_strict = 1 > > I pulled down v2 series and tried these settings on our 5.15 kernel. > Unfortunately none of them showed significant improvement on the > throughput. It's hard to tell which one is the best because of the > noise, but the throughput is still all far from our 4.19 kernel or > simply pinning everything to a single core. > > All the 4 settings (3 settings listed above plus the default) yields > results between 90 to 120 Mbps, while pinning tasks to a single core > consistently reaches >250 Mbps. I find that perplexing given that switching to a per-cpu workqueue remedies the situation quite a bit, which is how this patchset came to be. #3 is the same as per-cpu workqueue, so if you're seeing noticeably different performance numbers between #3 and per-cpu workqueue, there's something wrong with either the code or test setup. Also, if you have to ping to a single or some subset of CPUs, you can just set WQ_SYSFS for the workqueue and set affinities in its sysfs interface instead of hard-coding the workaround for a specific hardware. Thanks. -- tejun