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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D50F3C43331 for ; Fri, 3 Apr 2020 08:36:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A6C620787 for ; Fri, 3 Apr 2020 08:36:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A6C620787 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 079318E000A; Fri, 3 Apr 2020 04:36:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 029E98E0007; Fri, 3 Apr 2020 04:36:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5A978E000A; Fri, 3 Apr 2020 04:36:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id C92978E0007 for ; Fri, 3 Apr 2020 04:36:01 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8378C2465 for ; Fri, 3 Apr 2020 08:36:01 +0000 (UTC) X-FDA: 76665886122.05.fog80_8be08956ed851 X-HE-Tag: fog80_8be08956ed851 X-Filterd-Recvd-Size: 3493 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 3 Apr 2020 08:36:01 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id c7so7460558wrx.5 for ; Fri, 03 Apr 2020 01:36:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YmqsIpFQyQQ2Lq3jQLn2ED6h63YdDDqWuKLktL963FE=; b=ahGoLMbmnPu6118bZdCqCVXY2i65pN4sGpqFUkViDO2WwJyWr8I8fU3PMrZNnu5+Dw gZbqlVlGR/9PvipMLFGdH/xXdv5gIelOgKHpoXId/5Z6vOQPBD+Po2r4CdDpOTRwApue S9FKt7eXkclzf6wpkPmaB6scWy7lETjNfkTrYyHEqJTbnAlcp2OjpxEmJkKwKD6VNY0t 2R4FbPOlP0W9iFLNERupoMbrl82hVsFU3dJuh2E+vSY/M5HorQgClv0uEtFcJC01qkhY iBipf84UBu0ykvAtW18Tubr/Y6T0p9raPiGgw0u2XAW1AfuBW9za52RHb1PDOU2nvSfo 4jjA== X-Gm-Message-State: AGi0Pubtq4QBt15fcLo+laQ7pi9hv61aMAPQ6JM2W25JpgERdjkin5f7 nF1eqdYty99GVp7732tg3tE= X-Google-Smtp-Source: APiQypIG8pcQaw6IRSWQM+d3AwV+GjfW87kcXS+FPtd04pS58lgtBWpzeJsDAmRETTcbde+50hc16A== X-Received: by 2002:a05:6000:11c6:: with SMTP id i6mr8126218wrx.115.1585902959941; Fri, 03 Apr 2020 01:35:59 -0700 (PDT) Received: from tiehlicka.suse.cz (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id v7sm11010275wrs.96.2020.04.03.01.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 01:35:59 -0700 (PDT) From: Michal Hocko To: Andrew Morton Cc: Joel Fernandes , "Paul E. McKenney" , Neil Brown , , LKML , Michal Hocko , "Paul E . McKenney" Subject: [PATCH 2/2] mm: make it clear that gfp reclaim modifiers are valid only for sleepable allocations Date: Fri, 3 Apr 2020 10:35:43 +0200 Message-Id: <20200403083543.11552-3-mhocko@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403083543.11552-1-mhocko@kernel.org> References: <20200403083543.11552-1-mhocko@kernel.org> MIME-Version: 1.0 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 While it might be really clear to MM developers that gfp reclaim modifiers are applicable only to sleepable allocations (those with __GFP_DIRECT_RECLAIM) it seems that actual users of the API are not always sure. Make it explicit that they are not applicable for GFP_NOWAIT or GFP_ATOMIC allocations which are the most commonly used non-sleepable allocation masks. Acked-by: Paul E. McKenney Signed-off-by: Michal Hocko --- include/linux/gfp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e3ab1c0d9140..8040fa944cd8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -127,6 +127,8 @@ struct vm_area_struct; * * Reclaim modifiers * ~~~~~~~~~~~~~~~~~ + * Please note that all the following flags are only applicable to sleep= able + * allocations (e.g. %GFP_NOWAIT and %GFP_ATOMIC will ignore them). * * %__GFP_IO can start physical IO. * --=20 2.25.1