Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4984756rdb; Tue, 12 Dec 2023 15:40:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2ickkKSsl2sxe4Dp9523T5njeAv93h0lbj8bPvTtqfEynIaQLVnmjhBNxWtgrw2Ffx5Wd X-Received: by 2002:a05:6a21:a584:b0:18f:97c:5b9b with SMTP id gd4-20020a056a21a58400b0018f097c5b9bmr3903655pzc.105.1702424429260; Tue, 12 Dec 2023 15:40:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702424429; cv=none; d=google.com; s=arc-20160816; b=RagbEmVe3H/ySJV60mmqPEJr5nUFB68S3ItavQu+09YHG8vGWgsZbWU4p2MJjjnbJp 9K7g5xWYDp2UbuAlx8q4qdqwQCkZw95nXHIXGLI5p4Mr7r1ZM7jL4QVwKiomJ0hkr1Eg gbYAaYhXRg/yxNvs9Y0FXTS3j62UA1LREPBVN0ImFY45OY3Cj8DQl5Nsgl/wq5namqYP KQFgKpc/lEF9Z/0HR7wztS40n3ztPdtbjwpZfG4wg9P/vKhjulb7GU9LTmQttviFoir/ t2cUl876kSdmJTXYDgJVQfzpGKqmnvv2H7izAmTxUNPl+rlz9OX8+tz0UOFFUOuui/qg nDkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=+XUhg/gz838xI4R2n1f8w70CxgHijv28GkiMO9jNoo4=; fh=gDpnSSgvNOZ9o35uhFgrNUNXhEbmk0tXqswjx5BoEs4=; b=SoFC7W+bF0Aek7AXZiQRThcQW94zx2JSaaY1lo1A3gcF8FjM1wPcidYUwzYdjfcjKA xTGJUffBO3xp1+kK7T2QXaoa3j7Sf+XtumHPdCUhYJjfCmlvmffshwXr3KpqlobHuQOD Lv2Rq10S+S/Mp1kVFYwpsSLGfvnyJH5snYARRkdbQpiXTAZCAETE381SRbqAxxReT60d NqkAycMVvEP3BHNQvBVWU5GZB2pOU3Dc1uIl44uhYdeuj7iozpqxfLrY2G258C/DVmVg ZzBx06bZtjnV7C76/q+rdmAuc4Jf6/t7iw41IGoHPeLEF6OTdgr0BMuHx8qJmAskwNUn TC7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m64MaDwg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v1-20020a1709028d8100b001d34798ca50si730522plo.615.2023.12.12.15.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 15:40:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m64MaDwg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 481E680417FD; Tue, 12 Dec 2023 15:40:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235158AbjLLXkP (ORCPT + 99 others); Tue, 12 Dec 2023 18:40:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbjLLXkO (ORCPT ); Tue, 12 Dec 2023 18:40:14 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16D48D0 for ; Tue, 12 Dec 2023 15:40:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702424420; x=1733960420; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=rYt9y8KfAs0S4u+oQu0MTYyoDHJrw5FTNqxPbQrg/eU=; b=m64MaDwgFstmFrltKmvZ1GmpqdVHJ2uH5a+9jfnDehQCrP5Bxn6Y57sM UvKJNWKvr6KWi5aAMT7tSxMdfX3b2zJnvfqPSO90Mi7mEHa6dscl8fxTs t5i+A7F9hyR+dNkNrOaLjBn/N6AXngjD/BwZ+wsr7HPANSLq8BHyP2hIh QoOhZonMYI2qWZ4tsqYX3l6TY545LrvBdjSuduEfZIgqcS24w36oP9xJQ yreE+VLpj9wBC/HwUZb3molb6WWJznblnhL+gpeem6DwEH9JkSJ6mNHdI SB6gX1Psil1uAhlkpF45UOdXqlxHJq+ef5pe7gldkpaEBnx0GPlYAhKCX g==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="398730465" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="398730465" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 15:40:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="723414887" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="723414887" Received: from rfield-mobl1.amr.corp.intel.com (HELO [10.209.75.26]) ([10.209.75.26]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 15:40:19 -0800 Message-ID: Subject: Re: [RFC PATCH v2 3/5] padata: dispatch works on different nodes From: Tim Chen To: Gang Li , David Hildenbrand , David Rientjes , Mike Kravetz , Muchun Song , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, ligang.bdlg@bytedance.com Date: Tue, 12 Dec 2023 15:40:18 -0800 In-Reply-To: <20231208025240.4744-4-gang.li@linux.dev> References: <20231208025240.4744-1-gang.li@linux.dev> <20231208025240.4744-4-gang.li@linux.dev> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 15:40:28 -0800 (PST) > =20 > list_for_each_entry(pw, &works, pw_list) > - queue_work(system_unbound_wq, &pw->pw_work); > + if (job->numa_aware) > + queue_work_node((++nid % num_node_state(N_MEMORY)), The nid may fall on a NUMA node with only memory but no CPU. In that case = you may still put the work on the unbound queue. You could end up on one CPU no= de for work from all memory nodes without CPU. Is this what you want? Or you would like to spread them between CPU nodes? Tim > + system_unbound_wq, &pw->pw_work); > + else > + queue_work(system_unbound_wq, &pw->pw_work); > =20 > /* Use the current thread, which saves starting a workqueue worker. */ > padata_work_init(&my_work, padata_mt_helper, &ps, PADATA_WORK_ONSTACK);