Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4304421pxb; Tue, 31 Aug 2021 01:38:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNsXpTRJ5Gnf7FyR1QB8jDmbSNmsLcxM827QCKhXC69NkjK1W2wbZseu0R4Xk0+MiLtXIU X-Received: by 2002:a17:906:bc4b:: with SMTP id s11mr29256601ejv.246.1630399118469; Tue, 31 Aug 2021 01:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630399118; cv=none; d=google.com; s=arc-20160816; b=RFQArqiFh3rLL+80b4KajDaD8Dq0yM2D06KG9p9qHFbdo8Cg/ZtEyb8UfCFfzwrVUt P0ISwclf6K8C3cFJhAR0pkB2EuSFCLlrc/NI2gpTNrkQcVb9s/Tn0ja9VxuE3xzgnInV a14Ar78gpwHNlynQfseMJyMTRzrVOfRoLmGSkHk2Yk6JLLWY/8ENTWvmsBQo4l2pTnvk nZ97jCqwZpDLltu76HMkC1BwZp+bc9ptUOBYLpXyrpSXCGEnxvf+voRIh9fMhnyK8+4+ pIIDA5zeIeWMCZw/ydVe9LFIkeKAwgUj2kQBTtcb5dPbMDEjPtaNTpjvSQ7cFhZzMqvw IqUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+KfTm6BFHEtq1eHEg5/+ADHxfPrXMMNe0oYaKM+RhDE=; b=l2uDflEhgQzET1kxaEqG0tvpb+cK4Ymrbc3fsDSgHQfA2QPQDsValN7bHZfuXEbeAr m6atdVYKqr0ROj1CJRjkpkBIREU2daKD7IlzOkwgtHij5gfm0m1Jq3WgRpsGLvL9Oihc vpsU5OOADrs0Hqi/vkF0ZVmJ1pbuZa0Qo0Qs7UblFtDYNo9/Ls2Ur1ehGRMu9IjptYlI 4F64KTraazwWWnbk5ycJkm5kRjS5fVrRRx9XFkAoNpdKOPww8xZ8mpfTJiQU653J/rbk Kq3bpK1oiLdmfWBi1xPcwmdNWpZkPL7RR3edYHaoViLYTvrW1gGJ+ItaEK1FD8h8qHpB IQlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUWc85Pz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si2715208edb.471.2021.08.31.01.38.07; Tue, 31 Aug 2021 01:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUWc85Pz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240316AbhHaIdF (ORCPT + 99 others); Tue, 31 Aug 2021 04:33:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:36292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240304AbhHaIdE (ORCPT ); Tue, 31 Aug 2021 04:33:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CDAA560FE8; Tue, 31 Aug 2021 08:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630398729; bh=evRy179bA9/yF8IFACzwu79Pv8G7Hn/vmDMfFNnIDds=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nUWc85PzOUfu58a67bCq3zLnpotGlucdv25Co68sYPw13DDY2QqjInNinhSIXkC6C DbnhBVMTmrMYYWgG82O+cImQk6JA1unTdfTh6kTeHuU5arv15HGS6SmkTFLwExzj1y DVGbaMMIcxpadue42kaoIADOxXS7yUz9GW9hNwMaAXjXuAsgasPHVzX/ndJOzkiV/k pPOmlpHqD4x3KC2oBFgrQR2zdvpU1LrBPzs70DfPCCAb4InxK6SXtSKX3TEf0LQzVv QJc8XGeKkwQUfXDxCoPsueI1oEBte9nX431PsWrtoi87Addeeg2xIK0g5sxOznHoPL 1IWJTV8WhSttw== Date: Tue, 31 Aug 2021 11:32:01 +0300 From: Mike Rapoport To: Rick Edgecombe Cc: dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org, x86@kernel.org, akpm@linux-foundation.org, keescook@chromium.org, shakeelb@google.com, vbabka@suse.cz, linux-mm@kvack.org, linux-hardening@vger.kernel.org, kernel-hardening@lists.openwall.com, ira.weiny@intel.com, dan.j.williams@intel.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 09/19] x86/mm: Support GFP_ATOMIC in alloc_table_node() Message-ID: References: <20210830235927.6443-1-rick.p.edgecombe@intel.com> <20210830235927.6443-10-rick.p.edgecombe@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210830235927.6443-10-rick.p.edgecombe@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 30, 2021 at 04:59:17PM -0700, Rick Edgecombe wrote: > For GFP_ATOMIC in alloc_table/_node(), use get_grouped_page_atomic(). I think the patch that adds get_grouped_page_atomic() and this one can be merged. > Signed-off-by: Rick Edgecombe > --- > arch/x86/mm/pgtable.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c > index ef0b4ce95522..e65d69ad6e0c 100644 > --- a/arch/x86/mm/pgtable.c > +++ b/arch/x86/mm/pgtable.c > @@ -52,7 +52,10 @@ struct page *alloc_table(gfp_t gfp) > return table; > } > > - table = get_grouped_page(numa_node_id(), &gpc_pks); > + if (gfp & GFP_ATOMIC) > + table = get_grouped_page_atomic(numa_node_id(), &gpc_pks); > + else > + table = get_grouped_page(numa_node_id(), &gpc_pks); > if (!table) > return NULL; > __SetPageTable(table); > -- > 2.17.1 > -- Sincerely yours, Mike.