Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6001997ybe; Tue, 17 Sep 2019 17:51:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPwn8Rqd+BGNXXbdZuU39Ec+SGJbaQab36uCMoHfN/UrgMVsF8ycTrxicKWE7V/y7qCal0 X-Received: by 2002:a50:f782:: with SMTP id h2mr7386091edn.225.1568767890461; Tue, 17 Sep 2019 17:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568767890; cv=none; d=google.com; s=arc-20160816; b=JK2flfbC1zR5Qe4kWFFKPa1mYYwewr7rBXIqcUYvkXGecXye1U04GdM/L1R459We7+ Bg4ERJ8fUxriDhMfQ0wS737Qn/H0hW1+9xgaRQvBcqq0b+t/o+DP6u2vjBk+7HhopDfT GOT7ofdQUUEIcE8jMx6bkfQjY7KEsHxqwS2+N77KGDLbPHvzw3cxx19maHPkqtO5vF8j s/ee9VaJ0/xwdD1/jI4mVz0r+OAnyzy6jeO9B4bqZmjpY+1LelGhYhxL/uo092IKEqna GHqCoyziWEwSVKgQnPC9qu88aPOcNZdX5ZgysoBXhufmsX4oYT07c+G9QI6jsl3ydiP6 ZFKw== 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 :message-id:date:subject:cc:to:from; bh=IyaFgRR+lQ7FPubkyuXCgpJ5NLoT+To/kkLvrHcIU3k=; b=HA78yYzamhPjWQ1UCyT+Q1J7r9fupD4a/nVd+EXHAlbDX/eBgQhAeq9x76I/+V3f67 y28zMSg3Eep2vHRq8VzEpJxLnkT2+QQ0imMSjgfYolKB31SKdwJjM64A1rN/2ZcTnUpG KXqhQ0wcqqP7/7JROWfaStE2KryPiDfv/DtXCFLN83xuns/OjDYyHN7O61C9LWN1b9Kk SKYKTrDv+FNMqfv4XOUXN6LU0m2C5evzZsczpqPOaWsVAJxs+hFXG8xGoL+nSPfvEBkO vW9uoMgUrgKAXG9w1rSHekc189G6OPZCs93OTwQmCMe4v0wl2kyC9i6/xWUBRPsCPRYv lWzg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qh28si2044363ejb.210.2019.09.17.17.51.07; Tue, 17 Sep 2019 17:51:30 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728775AbfIQX2j (ORCPT + 99 others); Tue, 17 Sep 2019 19:28:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1313 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbfIQX2j (ORCPT ); Tue, 17 Sep 2019 19:28:39 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DFA618C4266; Tue, 17 Sep 2019 23:28:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.70.39.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id F248B19C6A; Tue, 17 Sep 2019 23:28:36 +0000 (UTC) From: xiubli@redhat.com To: mingo@redhat.com, peterz@infradead.org Cc: akpm@linux-foundation.org, mhocko@suse.com, linux-kernel@vger.kernel.org, Xiubo Li Subject: [RFC PATCH] memalloc_noio: update the comment to make it cleaner Date: Wed, 18 Sep 2019 04:58:20 +0530 Message-Id: <20190917232820.23504-1-xiubli@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 17 Sep 2019 23:28:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiubo Li The GFP_NOIO means all further allocations will implicitly drop both __GFP_IO and __GFP_FS flags and so they are safe for both the IO critical section and the the critical section from the allocation recursion point of view. Not only the __GFP_IO, which a bit confusing when reading the code or using the save/restore pair. Signed-off-by: Xiubo Li --- include/linux/sched/mm.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index 4a7944078cc3..9bdc97e52de1 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h @@ -211,10 +211,11 @@ static inline void fs_reclaim_release(gfp_t gfp_mask) { } * memalloc_noio_save - Marks implicit GFP_NOIO allocation scope. * * This functions marks the beginning of the GFP_NOIO allocation scope. - * All further allocations will implicitly drop __GFP_IO flag and so - * they are safe for the IO critical section from the allocation recursion - * point of view. Use memalloc_noio_restore to end the scope with flags - * returned by this function. + * All further allocations will implicitly drop __GFP_IO and __GFP_FS + * flags and so they are safe for both the IO critical section and the + * the critical section from the allocation recursion point of view. Use + * memalloc_noio_restore to end the scope with flags returned by this + * function. * * This function is safe to be used from any context. */ -- 2.21.0