Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp238404ybb; Fri, 3 Apr 2020 01:37:35 -0700 (PDT) X-Google-Smtp-Source: APiQypIIilqP1wNkSgQDOihwV/bpLyXNPAr4pxEshHlbdEjSZiX4b099qXOYlZP/Y3PWxgVMaade X-Received: by 2002:a9d:837:: with SMTP id 52mr5252994oty.354.1585903055739; Fri, 03 Apr 2020 01:37:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585903055; cv=none; d=google.com; s=arc-20160816; b=WdLET3Q7rc2yBIhRbD9tJdyZAaxmMguq/oLeTLTzzdu5D4Lm79elxIW5ghkhRxYVuS h390MAhhpx+3UQtnsEIdjioPCgaQC9uCLkkilPEhwvy8/Jb6QidJ9wGCweYUqQSDyY59 Klr+KrSE3l+iUiIhHHHdwqeZ1EV9uiUTrkcVmq1oVXuqKuw9clDI2aaDlBWqiwPA7Vd9 hQ8EkshtrLx0xr2ei2b2REr2gH7xRgFYPDQ1x7hfZierkgZ3ziBcBVM8khNDPdXQ0dby Dp/V/cuolB0XsuYGRyRokRb4nqXy27/Q2vHlOCod50IJqd+MfmC2TkQiexn7+0rwLySY bJgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YmqsIpFQyQQ2Lq3jQLn2ED6h63YdDDqWuKLktL963FE=; b=LwkJVCGbJk/Vv9T/P6TYUdCrqD0zlk+TIsXnfQ2yN8M+AHwwzxyDSAiWAj6AYvMhpk LR2nSlMgc5AQXI3IrlZVyg3yFAvtI/1BqMtzEKIh8NibpCtQzXrRTaTt+TJE4iu9XgTC Ne5Pi5U40pkGmkD2RJnAWDHibftkwD+AJ4wuU2MXteprOn+MMn//pDehemJmKmx7B4zS TEPt9h6NmtsztAOOpgVRsbJMrrMHO1oNXozO7xuaDiX6bpS9XoxMf4fbAc5FaD/tKahP +CWbjXLsIG10HCF/yktOaYvXMa2tpJ2gZK/XuP5KnIpvrazdtYa/9J24QeRZTYmgqJC+ Zucw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si3385664oig.108.2020.04.03.01.37.23; Fri, 03 Apr 2020 01:37:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390504AbgDCIgE (ORCPT + 99 others); Fri, 3 Apr 2020 04:36:04 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37885 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgDCIgC (ORCPT ); Fri, 3 Apr 2020 04:36:02 -0400 Received: by mail-wr1-f67.google.com with SMTP id w10so7513582wrm.4 for ; Fri, 03 Apr 2020 01:36:00 -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=SJ97OZH9O5N5ygZtYvx6VRn5CNZ+eeV+YYI7T0CiEY7zG0dvON0OrGcvocQ7veqYIa VzuoDgTpADbKCDXTukTMGr+UvsFzbzfIq/irZJAZzZHthm1AnQT8vYHGP+vvKaoq+Co1 O/GxLMd9P+xpRTC//DTv/x7GkV1AApGmZWkFnhYEUSKtIAoq6zAQBN1BkmsRCKpMzrpt PwdjNFrD6VFzQT3PzO0nDXHqWp0MIPKFuQaUpObifydDjtB1KUWD2yw8v7i+H5LtNl5M bAfuMk18cUpS1KhwE+vYTE1vHxhxHj2KzjY/OLHnF7uUuQoryk/gx5jLvbqdi7FzcTXE ZEyw== X-Gm-Message-State: AGi0PuZLI5pY86mJl6u4L2oyNSJbcsst/pOxMsvy+B47dCFQ0EVP4XYK VKacbUInEyFUOtFXmMaNwKTW9hP4 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: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 sleepable + * allocations (e.g. %GFP_NOWAIT and %GFP_ATOMIC will ignore them). * * %__GFP_IO can start physical IO. * -- 2.25.1