Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp823883pxb; Mon, 25 Oct 2021 19:53:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4jHSTsOLmhzxupwwYL1R7WCoY+sh/xsLn67c9UsggYevZ4qzLhoK+iqTtfFfJf+uT0YSI X-Received: by 2002:a63:2bd5:: with SMTP id r204mr16930978pgr.407.1635216832956; Mon, 25 Oct 2021 19:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635216832; cv=none; d=google.com; s=arc-20160816; b=H3UZuwdusxEUD0eEFd1iF9G+taUdcTznbhFvXfN9L4W50GLAeS3qXMwBmJabT+nBo7 f6dkpdWraqbkrmARN3yd5DJ0XIKBQArWYGpZOCdXwUdw0Smn4sY/roNWgYyTLe9I/SQk dPOLcGX1YnRtgApOOLEA5YjFeyghp1lpupiXBMVymz+M7E+wtGVE1Ms2BvNTvPjE6Ipy MzcdMlpQv+MmNFsgQtZrxeWZKBCv0JQ3OY0EvSWGj6SifO0B84vJ+HsPIfVGA8j0IV7v 5heOXf8vfF8SV0Fa9fCAK6XcWiHO7dxBlVHc+IUqM8L10f64lUDtyLT9mZWsxaZ5Wuxz 3tWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=m+IZGWtLl4OAI1X2s3DZ+k9SXIzlQxPOueBj83cICGg=; b=PL/8IZLegKWmPQLk37iByOBP3R+bCbNekwiGXtnQ2m0oIxj7ureBs5zl8Drea8C80K tYQpG8wYi3Pxlw79eGWi+qOoW2ttsDb2Cq5rsIgnP6j34tpNudJlQiDEMrnDhXqRpTaO KxGRHgxgpVYMVxHAK+BjLHsR+rdNoE+vhUkmu0fCBxd5x10kTIbvBk7YPq+YvlMcmrOA Lq5u2idOluvsFPwsAWQ+mSJ3PsS9nk/+aRAWmnv4Ddm3ZvPx6Bz6Qi7OqO+Q89Q5bZTj vTdTL6DnS0nMZ/5DPMHMTCXvCyPcXce6RBwdDLQ/SkV4SxkfjJMGmLuWTnTqQxoSPeD3 nNYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=o46aXyIB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=yyFaepim; 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=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e70si19251666pgc.35.2021.10.25.19.53.40; Mon, 25 Oct 2021 19:53:52 -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=@suse.de header.s=susede2_rsa header.b=o46aXyIB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=yyFaepim; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234755AbhJYX2i (ORCPT + 99 others); Mon, 25 Oct 2021 19:28:38 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:56224 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbhJYX2h (ORCPT ); Mon, 25 Oct 2021 19:28:37 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F358E218BB; Mon, 25 Oct 2021 23:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1635204373; h=from:from:reply-to: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=m+IZGWtLl4OAI1X2s3DZ+k9SXIzlQxPOueBj83cICGg=; b=o46aXyIBvq04uicCYVfiWFAdkB0uSORlCyXssW87c2JNPnffaJXld9wNI+lwslecrRwTvd h2OrWNyuJ/hyY7Y9hfDLp7DvyFcMCxy75bIxnS9dnFoCOmKWYrMiBzAhYyatDOHRvNa8L8 mPVcjeVNrBCspCBuelG+IGo7PXmhP9Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1635204373; h=from:from:reply-to: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=m+IZGWtLl4OAI1X2s3DZ+k9SXIzlQxPOueBj83cICGg=; b=yyFaepim+hepauLwuzIED+cuD/Vqwybq3vBfs1uaNBttaPuYfnkhsgceoVf7YCnLtzyQbk ss+OdnH9nO5reqBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D146D13B44; Mon, 25 Oct 2021 23:26:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 32KfIxE9d2GoTgAAMHmgww (envelope-from ); Mon, 25 Oct 2021 23:26:09 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "NeilBrown" To: "Michal Hocko" Cc: linux-mm@kvack.org, "Dave Chinner" , "Andrew Morton" , "Christoph Hellwig" , "Uladzislau Rezki" , linux-fsdevel@vger.kernel.org, "LKML" , "Ilya Dryomov" , "Jeff Layton" , "Michal Hocko" Subject: Re: [PATCH 3/4] mm/vmalloc: be more explicit about supported gfp flags. In-reply-to: <20211025150223.13621-4-mhocko@kernel.org> References: <20211025150223.13621-1-mhocko@kernel.org>, <20211025150223.13621-4-mhocko@kernel.org> Date: Tue, 26 Oct 2021 10:26:06 +1100 Message-id: <163520436674.16092.18372437960890952300@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Oct 2021, Michal Hocko wrote: > From: Michal Hocko >=20 > The core of the vmalloc allocator __vmalloc_area_node doesn't say > anything about gfp mask argument. Not all gfp flags are supported > though. Be more explicit about constrains. >=20 > Signed-off-by: Michal Hocko > --- > mm/vmalloc.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) >=20 > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 602649919a9d..2199d821c981 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -2980,8 +2980,16 @@ static void *__vmalloc_area_node(struct vm_struct *a= rea, gfp_t gfp_mask, > * @caller: caller's return address > * > * Allocate enough pages to cover @size from the page level > - * allocator with @gfp_mask flags. Map them into contiguous > - * kernel virtual space, using a pagetable protection of @prot. > + * allocator with @gfp_mask flags. Please note that the full set of gfp > + * flags are not supported. GFP_KERNEL would be a preferred allocation mode > + * but GFP_NOFS and GFP_NOIO are supported as well. Zone modifiers are not In what sense is GFP_KERNEL "preferred"?? The choice of GFP_NOFS, when necessary, isn't based on preference but on need. I understand that you would prefer no one ever used GFP_NOFs ever - just use the scope API. I even agree. But this is not the place to make that case.=20 > + * supported. From the reclaim modifiers__GFP_DIRECT_RECLAIM is required (= aka > + * GFP_NOWAIT is not supported) and only __GFP_NOFAIL is supported (aka I don't think "aka" is the right thing to use here. It is short for "also known as" and there is nothing that is being known as something else. It would be appropriate to say (i.e. GFP_NOWAIT is not supported). "i.e." is short for the Latin "id est" which means "that is" and normally introduces an alternate description (whereas aka introduces an alternate name). > + * __GFP_NORETRY and __GFP_RETRY_MAYFAIL are not supported). Why do you think __GFP_NORETRY and __GFP_RETRY_MAYFAIL are not supported. > + * __GFP_NOWARN can be used to suppress error messages about failures. Surely "NOWARN" suppresses warning messages, not error messages .... Thanks, NeilBrown > + *=20 > + * Map them into contiguous kernel virtual space, using a pagetable > + * protection of @prot. > * > * Return: the address of the area or %NULL on failure > */ > --=20 > 2.30.2 >=20 >=20