Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp741034rdb; Thu, 18 Jan 2024 18:55:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IH360A6kIZSC1stMyhiHgf7jelJ1JjABjxe4R8YSLovQQU2klKO8ae97hJsEqLDz0BOu4lb X-Received: by 2002:a17:906:3690:b0:a2e:68ff:53d9 with SMTP id a16-20020a170906369000b00a2e68ff53d9mr958267ejc.143.1705632942928; Thu, 18 Jan 2024 18:55:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705632942; cv=pass; d=google.com; s=arc-20160816; b=dvzRh7cRrzsz6yu6KRfMuf16XfIeWHa6N7KujRNMejho1S8K9WX6NIfEZyRErlm+YS 1yiTApK56XOf1b+lsWQxJgpjfuJrnhfnD0bIuJmqNfxuBcb7Hv6cOIkUGm2S25RlVQ2l VafISLwDKo84b1YKk3z6ZXw6kOpy2OAOzlGIMdpXJr6Ij1E8ZdmeujgngkKJA/wAaduY IGm1zUDfHdqqQcm+aycFEU6w1RJFDswmutPTuGB3XlB2BJrdEuXaoElkfh/wf8rCLmlC ckPUVcjj9jUzrPTOa2uL2TivMsHAFy9JilXp0IHyK5Ta++NzPmTclLbCEKJkIdep85n6 eSxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=nVV0GAZomkybNTFhBHxnmDns6Siw62nEuJmiDpVUSoc=; fh=AYxwyR3J/kPtM4magQIyzlUdQEW2jx+zDn9RDMQmKe0=; b=nrVi3kPXKjgxM7YlPB1VhSVYrtVDg78OFBWsuJZFhP42n7v1QIfBNtsAZMEv9kCQM8 /5fuA5eoRfMzw7vCg+Ko2RE///Sx2LvSS2Ihv5Cglc6MRU6bkQirVU4Dt0zmc80/AEHA b0AUQg/7ltQQdF/JbCBPZDz0sOv6gvztGAPoZoCMBX/s/OeXaknNYNsc/LF/+s6gCXf1 L0/YtN0WPy45gNVChQUHAfBHCBCooiXygT0hujyUjbSnKmulHd1X1In1fNn8mkmMhUzs Vt0xZMuegmuc6cQ+jNSo4YW5SpyDz0yWHwPvORyHvxdGDEPJAqMd8jjOXtUyNHr2DSFP IdGg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GzcoP1hj; 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-30719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30719-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. [147.75.80.249]) by mx.google.com with ESMTPS id bj17-20020a170906b05100b00a2c3e53943fsi7096393ejb.220.2024.01.18.18.55.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 18:55:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GzcoP1hj; 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-30719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30719-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 AE16F1F236E1 for ; Fri, 19 Jan 2024 02:55:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4E054A04; Fri, 19 Jan 2024 02:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="GzcoP1hj" Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 28A3A4689 for ; Fri, 19 Jan 2024 02:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705632935; cv=none; b=BZ+Zcn2h2ri24YnkKgYhIK1hW8CCeqraTc4wTFxySuZJGMTVcY4PQX8eIBfSCKgyvnBeJMwFE4gzViX60db8LmYwTZIr2bH0Z7fHrbpsQnO8a/BTxKan7JygBIhpv+c7+ChIeoDXZXLin/UlDQ9FylkdjgjqolgtGHigmAsHlsg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705632935; c=relaxed/simple; bh=dfumpJtIdKlNuKqQWiGK95QOE37/ccF6Ylw8rGJGrw4=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=rdPwWs1PZmm2eJEr+fwxFSFYmvZlAZ1jd28mESW8sacYw1ElOT2LXzzt3woCEsWL9I2mk9H/PTc7Fsda05i4oHCOm4rRexS4uOOiXY7tow8NPiGZKm7Llb42XhhgeBlmUrXEN9kd7Q+WUMAlcmo9CWURk6yyACR3/K1iRKxsJJc= 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=GzcoP1hj; arc=none smtp.client-ip=95.215.58.170 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 Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1705632931; 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=nVV0GAZomkybNTFhBHxnmDns6Siw62nEuJmiDpVUSoc=; b=GzcoP1hjD25gxdJYMEvenAHq0Bs10vl2Dgh+GHdFwisGTYDWXMP6ETbEDHZmm71iIVG2E7 J7HwJMe6OZWj5VSa66/p1zlQajZIPLpnHZzQ6ZYoeH/7D9ZnwszFhwSI6bAiHWxS00Dcmu hBr8TyQVl7rL64Dra5acukIK/M9WMxM= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: Re: [PATCH v4 4/7] hugetlb: pass *next_nid_to_alloc directly to for_each_node_mask_to_alloc X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20240118123911.88833-5-gang.li@linux.dev> Date: Fri, 19 Jan 2024 10:54:50 +0800 Cc: David Hildenbrand , David Rientjes , Mike Kravetz , Andrew Morton , Tim Chen , Linux-MM , LKML , ligang.bdlg@bytedance.com Content-Transfer-Encoding: 7bit Message-Id: <6FCCD287-152F-43AF-AF20-E8408E2CB378@linux.dev> References: <20240118123911.88833-1-gang.li@linux.dev> <20240118123911.88833-5-gang.li@linux.dev> To: Gang Li X-Migadu-Flow: FLOW_OUT > On Jan 18, 2024, at 20:39, Gang Li wrote: > > With parallelization of hugetlb allocation across different threads, each > thread works on a differnet node to allocate pages from, instead of all > allocating from a common node h->next_nid_to_alloc. To address this, it's > necessary to assign a separate next_nid_to_alloc for each thread. > > Consequently, the hstate_next_node_to_alloc and for_each_node_mask_to_alloc > have been modified to directly accept a *next_nid_to_alloc parameter, > ensuring thread-specific allocation and avoiding concurrent access issues. > > Signed-off-by: Gang Li > Tested-by: David Rientjes Reviewed-by: Muchun Song Thanks.