Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1052687rdb; Fri, 19 Jan 2024 06:57:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IH27RP7ZZsmWuaPeWjlZzSUNr05ERmAhEF6++Fz1MZvWlmJvoU5wLlgg3Liz55OcXdjfOXM X-Received: by 2002:a05:6214:d45:b0:681:80d4:21c7 with SMTP id 5-20020a0562140d4500b0068180d421c7mr3219499qvr.60.1705676232369; Fri, 19 Jan 2024 06:57:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705676232; cv=pass; d=google.com; s=arc-20160816; b=aFrUuv5AQxL5GLZZK4pUQlDhW0kejZ+8M3/hHX7ENreP9JhG1xqO3Y3fnvk++h0U6V vgUmpDsMk/c4nniJ12c84Y3w8/UbF+TDW+PEUrUFN+WPoR6aatKbcq5/nm/ME9Uhh4OE m6EqTVExxsuQKBM7+F9qUo2y7kv6U3DxCqXYmpeJ1tk4sPbBcrtGiViL8qM56axpuDAA YY3Xp4GmIcM7593aVrx2/4KD/Ic57nYBLIbGO1gS/vbWWk2dD0rgwilwFJcu3SwsWKN1 ZA54xY4TCPhn+FIO+TdzQ4vhoRD9JipJIVFPxFzPq/DHNqlIqwtXElSuLR/d/XTtA8ti kw7g== ARC-Message-Signature: i=2; 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=h4qbCQgj12O8En/gusu3QK+XK6h8GB3JBzV0B53LnBI=; fh=osh5igvOg2qu4dNGPFZZJ+rRpKlCwk1rRlyLe/f0CqY=; b=Sukpr7bJidBCNvcigrJ7I1zIowU3IgzpF7336InXhh7Mf5m+ztHN8w8cmlFyANM3nu E+lYe0zm5KiD8ydVtoO9aPt+IpGLGYIHWAJBni4lShJmB7n7m3mbrz315kpfvTXde4AX m3aG81rtI1pG2KQQgnNoX2qKmkkfWKhnFLsjD40YEmev8JU5ZXeauxFwblkhkPBHRUP2 m5giZLbH5KVdMVe1ByLw1Wv2M/jgUofULKFU1wX9/5+lkNRED6ySRs7rksheYktTtlAy 523WRX8IDSIAvf4ie/PiWZvg4/NjI+91PR0r29Q3MMihGXeot4VY/ofMgAKJEHIwc1L4 ZbHg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=YNzferZw; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-31292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e28-20020a0caa5c000000b006819ab1f148si2538754qvb.522.2024.01.19.06.57.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 06:57:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=YNzferZw; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-31292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31292-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2646F1C23ADE for ; Fri, 19 Jan 2024 14:57:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1217E54756; Fri, 19 Jan 2024 14:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="YNzferZw" Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 4F2845465D for ; Fri, 19 Jan 2024 14:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676131; cv=none; b=B6FozqOrhhxWHAAX93tbnrxKIQRpijpb7POrIdZbe1+tqyAjZ5hor51zVMUjod09IgBcJO5YieAFl6qOI6wtyFBTeoGjnR/9uC7lWui0zkEjvOBgB3hDm8edksRwenbCw9kNqVbxvDja0cAcbRK7dFkbosp2rAKVz1OcZj6a2YY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676131; c=relaxed/simple; bh=2vuvuZhE3Kv0/p2bla2HuOKxDw5tnq7PECF2bh4brnk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lRP+R/rpqKJ9cgC4hNScOYvjEFRT2ZWCKoBtT0ZTb5sXWWu0BwSTa9qnhmm6YV3NQs7FeARDB/Qn1pCJ9D0lggGWIakvciLM9rn+R3RObEDVIwLUKYiPUJTdkhKeGmXTqNbsKQpiRyUZDqEimvDyo3AuqEftHz1CL9OM+qqEsRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=YNzferZw; arc=none smtp.client-ip=95.215.58.186 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: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1705676127; 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=h4qbCQgj12O8En/gusu3QK+XK6h8GB3JBzV0B53LnBI=; b=YNzferZwWQ6R67NBzwQZe0NUaJQyAKDcurN5py4mjGZsPK/MyRETgjnkF//XD52NxPQuHX qBmUyBX6t53kh3Lz/0imTLZHQr9RuadMvDoFEttEagqbv5QgvbI/UY/0fvdo5CbbANGqPW hBGTY34pztOlyUYN8g3x4u5IO59/5/M= Date: Fri, 19 Jan 2024 23:05:11 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v4 3/7] padata: dispatch works on different nodes Content-Language: en-US To: Tim Chen Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand , David Rientjes , Mike Kravetz , Muchun Song , Andrew Morton , ligang.bdlg@bytedance.com References: <20240118123911.88833-1-gang.li@linux.dev> <20240118123911.88833-4-gang.li@linux.dev> <29695e89ae2d838c9b7537941b0231c3ff559e48.camel@linux.intel.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Gang Li In-Reply-To: <29695e89ae2d838c9b7537941b0231c3ff559e48.camel@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2024/1/19 07:04, Tim Chen wrote: > On Thu, 2024-01-18 at 20:39 +0800, Gang Li wrote: >> When a group of tasks that access different nodes are scheduled on the >> same node, they may encounter bandwidth bottlenecks and access latency. >> >> Thus, numa_aware flag is introduced here, allowing tasks to be >> distributed across different nodes to fully utilize the advantage of >> multi-node systems. >> >> Signed-off-by: Gang Li >> Tested-by: David Rientjes >> --- >> include/linux/padata.h | 3 +++ >> kernel/padata.c | 14 ++++++++++++-- >> mm/mm_init.c | 1 + >> 3 files changed, 16 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/padata.h b/include/linux/padata.h >> index 495b16b6b4d7..f79ccd50e7f4 100644 >> --- a/include/linux/padata.h >> +++ b/include/linux/padata.h >> @@ -137,6 +137,8 @@ struct padata_shell { >> * appropriate for one worker thread to do at once. >> * @max_threads: Max threads to use for the job, actual number may be less >> * depending on task size and minimum chunk size. >> + * @numa_aware: Dispatch jobs to different nodes. If a node only has memory but >> + * no CPU, dispatch its jobs to a random CPU. > > Suggest: > Distribute jobs to different nodes with CPU in a round robin fashion. > Good idea. Thanks. >> */ >> struct padata_mt_job { >