From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93BFBC433F5 for ; Wed, 20 Oct 2021 08:25:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 41AB9611C6 for ; Wed, 20 Oct 2021 08:25:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 41AB9611C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D06B96B0072; Wed, 20 Oct 2021 04:25:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB70E6B0073; Wed, 20 Oct 2021 04:25:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA6C7900002; Wed, 20 Oct 2021 04:25:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id AD35C6B0072 for ; Wed, 20 Oct 2021 04:25:56 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 50A4022AB9 for ; Wed, 20 Oct 2021 08:25:56 +0000 (UTC) X-FDA: 78716132712.40.7C0CC73 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by imf22.hostedemail.com (Postfix) with ESMTP id F24B61904 for ; Wed, 20 Oct 2021 08:25:54 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id s198-20020a1ca9cf000000b0030d6986ea9fso8256589wme.1 for ; Wed, 20 Oct 2021 01:25:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pgSRS53yor4/W1ex9Z2HbXrLEzhX0+rUSDcCEksYWe4=; b=ZNkflTNVBVndRamRKmzV04BvTnWtcBymtKFwcv/Iv3MyJ4WaPrAJdW7837qBnP1SaH TP4AKuRMcdH8ACdOMVEZplvb39uUGSOwsVlGcbkDKImRGthA43HNUhptio5NOGk1ShIj UTmJxitcPEz2rT/yGjB3qXpIRZkybebLAb3qhHs6aJSv5fNenM7zJMnnoN6gIKz3OKgw K6dzjyI980ZtPmGcmRYMZWy7qw73kYG8Xk2BCx23jma8qsdeKsMMRrZ1yR1vHmRNu6gb j7tsQJEsSTSDVZFI+11r5S0LOGbemMIWNwZaTNAlPNqXuepytCKUrEOLKZ30nROPSFsj XfjQ== X-Gm-Message-State: AOAM533KbOBCYwoYpLkiB60TRgJI/KhpSC0r+JhkB0TCISLuEuDh7q1R 2BGZeBAtTgJ6FnZXTIqSGr8JMQ8+swI= X-Google-Smtp-Source: ABdhPJxl0jyUaqcSoVWh1W6m5L4Ui22r9rjXIiIIZ3g6VlfISOH+EXu59dakftSR4S7bCig4eGmg6g== X-Received: by 2002:a7b:c14b:: with SMTP id z11mr11968924wmi.67.1634718354848; Wed, 20 Oct 2021 01:25:54 -0700 (PDT) Received: from localhost.localdomain (ip-85-160-35-99.eurotel.cz. [85.160.35.99]) by smtp.gmail.com with ESMTPSA id c3sm1317047wrw.66.2021.10.20.01.25.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 01:25:54 -0700 (PDT) From: Michal Hocko To: Cc: Dave Chinner , Neil Brown , Andrew Morton , Christoph Hellwig , Uladzislau Rezki , , LKML , Ilya Dryomov , Jeff Layton , Michal Hocko Subject: [PATCH] mm/vmalloc: be more explicit about supported gfp flags. Date: Wed, 20 Oct 2021 10:25:45 +0200 Message-Id: <20211020082545.4830-1-mhocko@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211018114712.9802-3-mhocko@kernel.org> References: <20211018114712.9802-3-mhocko@kernel.org> MIME-Version: 1.0 Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf22.hostedemail.com: domain of mstsxfx@gmail.com designates 209.85.128.51 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: F24B61904 X-Stat-Signature: duet5t5aaape7c7hbf8qs3tjnb66tyyr X-HE-Tag: 1634718354-83572 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Michal Hocko 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. Signed-off-by: Michal Hocko --- mm/vmalloc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index f7098e616883..f57c09e98977 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2979,8 +2979,16 @@ static void *__vmalloc_area_node(struct vm_struct = *area, 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 m= ode + * but GFP_NOFS and GFP_NOIO are supported as well. Zone modifiers are n= ot + * supported. From the reclaim modifiers__GFP_DIRECT_RECLAIM is required= (aka + * GFP_NOWAIT is not supported) and only __GFP_NOFAIL is supported (aka + * __GFP_NORETRY and __GFP_RETRY_MAYFAIL are not supported). + * __GFP_NOWARN can be used to suppress error messages about failures. + *=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