Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3288432rdb; Wed, 27 Dec 2023 02:34:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDloSXC5MZIdYGfDieMEsogE42Bbbto0trQwZV7w5QsqU6m9Upgcs2X6TH6OlgKAjCAnrW X-Received: by 2002:a17:906:6d06:b0:a22:dc71:769b with SMTP id m6-20020a1709066d0600b00a22dc71769bmr4062156ejr.137.1703673248918; Wed, 27 Dec 2023 02:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703673248; cv=none; d=google.com; s=arc-20160816; b=s074pdlEx9S5I/uyAQAGSuE+ndgklBWqcjkOKDmnTuM6ZjAgLnPrqdF9zEYDitBsyo OQow+7sNWIUARADRYBEL0v9t1qpTvyINS6KZ5w4cZ/uc97c8no7kq0YqZf1gd5DGovfm r1/NJv1LL8FLO6yPrBFE9OkhdVLIne6OTp+vf++VvChCi0Alq+SlvO+g66aFdjrQyBG8 2bQDFdGrMu93GiMuEt0URvN3ucbwsKhKDDojozlVTarmtdkrqOs+HdgqOMFnNa0LT7Qg 8S+dYd4nGdHdIFLonY0Im3zLtCetD2Mp5NKt18PuqHRkoUqqUV5LaDUKh5nS4fR0z/ap v60g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=2HFfje7b6p9aJjTf6TauFhLwkAz1k9f+8nEkuAPySQA=; fh=4loYmvbM3w+TgJJy/0yJccKumTSbG7ni6k6m/75aYkQ=; b=aHpzzc5l8Y16sIhjGPz8PqFnXQib4QFNQ/aouYcQ7U0AuQemcbIfyfit+62BchOTIR FPz7mfMfd3w74Lwh6uW4JDWgaQbVKAV8SpdjOkCbwBbWC/UyVRdBMkwtStUQyfBMWbIj uk3SdlPnPpqgHxaPmMyQg8TQqqwaM06pS3ArasEUuHiicLafpCh1hMq655u/ECQ26s1h 8oQPsc+y9LKUa5E2NH5XUo/kYqeWwaHOkhMPXA3ol8Fk705ruiwkYDbP6UyeN2K+7ULu qtb2/asQ0W0Q92tKi95IeTTygNzil41yMMGiHyWBOSleMwsLcmpKnDrQF+/CJ+DcHVrx 27ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="NynB/8pW"; spf=pass (google.com: domain of linux-kernel+bounces-11962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n13-20020a170906118d00b00a1c7c770507si6091486eja.286.2023.12.27.02.34.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 02:34:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="NynB/8pW"; spf=pass (google.com: domain of linux-kernel+bounces-11962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 78BD01F22320 for ; Wed, 27 Dec 2023 10:34:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B24D4436D; Wed, 27 Dec 2023 10:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="NynB/8pW" X-Original-To: linux-kernel@vger.kernel.org Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBCF337143 for ; Wed, 27 Dec 2023 10:33:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <1a236102-0607-4952-8bc3-0cb45030bc6a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703673236; h=from:from:reply-to:subject:subject: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=2HFfje7b6p9aJjTf6TauFhLwkAz1k9f+8nEkuAPySQA=; b=NynB/8pWyjazFha5Auojw6RCTc2j+k6PFrIB4IT4qNBj22kLf8d8qkynK8+dlBeZ7T/+gU y3sZpgGo6ji/uLU6SRG+4yI8uYs+6b/pc/6s8MEM3Q1HeWsaARMLCGMx1HdrByXhcw26cH V4UM35uYGru7kCxASNF2n9M1mSWQhNQ= Date: Wed, 27 Dec 2023 18:33:50 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [RFC PATCH v2 3/5] padata: dispatch works on different nodes Content-Language: en-US To: Tim Chen Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song , Mike Kravetz , David Rientjes , David Hildenbrand , Andrew Morton References: <20231208025240.4744-1-gang.li@linux.dev> <20231208025240.4744-4-gang.li@linux.dev> <642a3472-9570-409a-94e0-64f30966b86f@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Gang Li In-Reply-To: <642a3472-9570-409a-94e0-64f30966b86f@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Hi Tim, According to queue_work_node, if there are no CPUs available on the given node, it will schedule to any available CPU. On 2023/12/18 14:46, Gang Li wrote: > On 2023/12/13 07:40, Tim Chen wrote: >> >>>       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 node for work >> from all memory nodes without CPU. Is this what you want?  Or you would >> like to spread them between CPU nodes? >> >> Tim > > Hi, thank you for your reminder. My intention was to fully utilize all > memory bandwidth. > > For memory nodes without CPUs, I also hope to be able to spread them on > different CPUs.