Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp713567rdb; Thu, 18 Jan 2024 17:31:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZTkzxbaLrFX64ZcEHx90kA3KNj8R5IdsdzB+P+3XwRG7qPcr1GzkGAEXgSQPM1Gqu9i9z X-Received: by 2002:a17:906:5f95:b0:a2e:1ec4:7cc5 with SMTP id a21-20020a1709065f9500b00a2e1ec47cc5mr870563eju.90.1705627866080; Thu, 18 Jan 2024 17:31:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705627866; cv=pass; d=google.com; s=arc-20160816; b=uNrgwOxewmu7e6LAMrHY5l7FD9U2X30cjHdLL9uPTEY8Ywc29pSJwlZGwUyH149aCP QeI3EtvtmZ6sOM0UaMi0ZmPvQUU2yYa6Vh1+AnPLEFS/YwLWpI48pFCz2+iqVaRf9OMO J3qtJfV0jRUbrzfhD4k3/Zr7EpUNDbVrVFT4K4QQg3Rdjyy4YI5zRRxbYlv2x9eQcLSk 7I4JOXc8mo2aEEwLBwJ4Cu0uT+UjjDPjmmH5RqhMXvPjmC06jw1pyLw+kSJUdfDGXx5L pVqapP5uab0kMeVkVOflL2CsLzN2x+tr0ZXeuzoTPVcqvziVruZ6lrdu0qs50I2728NV P0Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=e++bOFymtIcBODSWDSEq/iKeAIBozwrCs3xF0JYs6zI=; fh=gDpnSSgvNOZ9o35uhFgrNUNXhEbmk0tXqswjx5BoEs4=; b=wj6EQnxDSinv8k46sNVAYwgNtz0Two3DL9itAv5mMHC9rWsAWEFQyRn2BqnIuJJOqA qGMyojWAPXEf3f6ZjmFHzGx6oX96qh7FjjCRKLrzMAq2zbcINvXTGlFUdUXK1VrjAdxV RMRjU5RdNWKuxqaYSa8mFhrY8un4Cm2GZFm/flFUgF474h4V25j8rQKjCTCqNaMWDcW7 RaLBS6SvDdRuQauK8dyGYGjxlaWoZpZq5m6vgsnVceX3Plqycp+tN7zPmoGRPW2o8sch VLY4yc2PidV9fR7hgpd698YLQuPjQPqu3nlVQPVPr8q465cd9Fkq944Bwe4/R7ThUkWk DEnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=U4TRNLYO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-30622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t24-20020a1709066bd800b00a2cebb492a4si5945349ejs.885.2024.01.18.17.31.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 17:31:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30622-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=@intel.com header.s=Intel header.b=U4TRNLYO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-30622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 87AE91F21BC1 for ; Thu, 18 Jan 2024 23:05:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A76071EA66; Thu, 18 Jan 2024 23:05:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="U4TRNLYO" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 1345F1DFE6 for ; Thu, 18 Jan 2024 23:04:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705619099; cv=none; b=gubRRDsSOUWr6WzZN4r16jOQt7alHlvq//4m73nc/ygxMomWf8S58TGWxX+3jN8BSW5FRcxWaIuX4bj0nsq927lGoV7noEsTGs1VRLkbcO9qzNQhmsT3YOw2fDtxMob+Zoh2L7lLA6iNIByeGjqgmznorq7A8HMT4yI4RM0t1cs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705619099; c=relaxed/simple; bh=pXV1Phm7gXXc/IcPaGLWOcCoYm5um13/FmP8uLYS4j0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=UKcawRq7XXEUdXBokK9L1To3giFqn75e6lLXTElmNLvMpDFZzFTq+t2FKz96eXTnf6CsS+CHxdQ4Rg6MXnb/M/lb21bxD+nJrHSxJEsZ2pvfh2VcBr1OieX2yeWMDpLrbWTCaVvQFu41/dQmMDc6IYA3E+HN+Ii724YGjsMMSic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=U4TRNLYO; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705619098; x=1737155098; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=pXV1Phm7gXXc/IcPaGLWOcCoYm5um13/FmP8uLYS4j0=; b=U4TRNLYODtIBiHDaXdfZPGzJ3W4aHzpAqTnyiYMJeOglYnFl1pH5Uaky pCI4ixdwEzGw0TFa7Tvbf9pBuRGPlqE4RTkFp27gjbdHSqg9J0pQ0ZY1u JokxwAPk5ZGoi+DLics0f06ehJNviVV9ROIccpDh5jSZd/GzpPQqgzSMM hTNy+KxSwcBTQ59tlF3/tzjzipOWi9fVi7Gv49Q6eJ4a0Ql57lnD6bvWg q1JE56wOQUk1E6y/btOfrzsVIqGN5qAVRjSsKExdEtQsUaFqj4sL/wPqy IILkA0z5op4+tTV/jCCm17UGGaQ0jcfXQqnN0Ivl1sYPaM4TwURo+ullQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="7310168" X-IronPort-AV: E=Sophos;i="6.05,203,1701158400"; d="scan'208";a="7310168" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 15:04:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="784913168" X-IronPort-AV: E=Sophos;i="6.05,203,1701158400"; d="scan'208";a="784913168" Received: from dbhadrax-mobl5.amr.corp.intel.com (HELO [10.209.111.124]) ([10.209.111.124]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 15:04:56 -0800 Message-ID: <29695e89ae2d838c9b7537941b0231c3ff559e48.camel@linux.intel.com> Subject: Re: [PATCH v4 3/7] 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: Thu, 18 Jan 2024 15:04:55 -0800 In-Reply-To: <20240118123911.88833-4-gang.li@linux.dev> References: <20240118123911.88833-1-gang.li@linux.dev> <20240118123911.88833-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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. >=20 > Thus, numa_aware flag is introduced here, allowing tasks to be > distributed across different nodes to fully utilize the advantage of > multi-node systems. >=20 > 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(-) >=20 > 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 le= ss > * depending on task size and minimum chunk size. > + * @numa_aware: Dispatch jobs to different nodes. If a node only has mem= ory but > + * no CPU, dispatch its jobs to a random CPU. Suggest: Distribute jobs to different nodes with CPU in a round robin fashion. > */ > struct padata_mt_job {