Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6383496ybe; Wed, 18 Sep 2019 02:33:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzM4etip3n4c10Fyl1z1XxjOmGQI2BWFOi25Lu82z1LKJiIHGCT0lxwmV6OpF9C1SJtNX13 X-Received: by 2002:a50:c351:: with SMTP id q17mr9245930edb.123.1568799182019; Wed, 18 Sep 2019 02:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568799182; cv=none; d=google.com; s=arc-20160816; b=ANgKXJLSdR3tzasBmlE5qVx0qTNm1tUbuXc/1EuQ8jBqO5qY/E/kh08kcY97jNMMTy hc0woM4qo5MfsNYk291Dym5eylOCv1ejszbLz9RQANSJmrp70cSZnq89152Juy087inC VE97KJwMtfgQ/xZmYNVmXHBVti/ehmcolM62TdV1BX9UichX9mS57R2XmOPh1LNVNGtZ FG3vLrr/kuvDnjkO5bZpfi5lhDS0bwonzi4n//VBi5yqcfWVEqI+JWsGxxaZWw6aort9 TBcI0DjIJ2r9TdWsteYo+WprP8keeJtU8Z7u8kZi3HyB6bEx7vn2uTxLbJ9D9tBMcuvC QJuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8ecuNDdSLRzc8FSGHrGxyRioS3ZoFIr0M7wpac9XjN0=; b=zeVX1DkPgs13wbhJFXt8OKz0cLuF3fz4P/z2FtH2SqkJEJ9WRoeNWhXSI1yaHKyH6O qUb+P1UTYUXGtVqmZowJILMC+D2tuwVTzMSc5A5DrA3Y+8UlMjrrNiF98252pwUJukOp M5bxws6phvvdjD0ElcY+cl3E8RtNELKm8/64OYKvEVwWHtQSZLviK/UKWfeRQ3wsj0Hj Xd94DMJMdI8rfknacLKmURU/hwnpyDJ9A19tiwWelRzZ5rB6MRKqtiMq+MlR6bjEDqBN SCWBD8fZXdaWBmxJgWBP3WJ53KO0IGSSUgs+rednTAFBuqOJ7jrGuqVxerGWz8G5RnB5 XHbg== 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 t9si2451794ejr.29.2019.09.18.02.32.38; Wed, 18 Sep 2019 02:33:02 -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 S1729894AbfIRIPA (ORCPT + 99 others); Wed, 18 Sep 2019 04:15:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:36046 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727569AbfIRIPA (ORCPT ); Wed, 18 Sep 2019 04:15:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8004EAF80; Wed, 18 Sep 2019 08:14:58 +0000 (UTC) Date: Wed, 18 Sep 2019 10:14:56 +0200 From: Michal Hocko To: Xiubo Li Cc: mingo@redhat.com, peterz@infradead.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] memalloc_noio: update the comment to make it cleaner Message-ID: <20190918081431.GD12770@dhcp22.suse.cz> References: <20190917232820.23504-1-xiubli@redhat.com> <20190918072542.GC12770@dhcp22.suse.cz> <315246db-ec28-f5e0-e9b3-eba0cb60b796@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <315246db-ec28-f5e0-e9b3-eba0cb60b796@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 18-09-19 16:02:52, Xiubo Li wrote: > On 2019/9/18 15:25, Michal Hocko wrote: > > On Wed 18-09-19 04:58:20, xiubli@redhat.com wrote: > > > 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. > > Historically GFP_NOIO has always implied GFP_NOFS as well. I can imagine > > that this might come as an surprise for somebody not familiar with the > > code though. > > Yeah, it true. > > > I am wondering whether your update of the documentation > > would be better off at __GFP_FS, __GFP_IO resp. GFP_NOFS, GFP_NOIO level. > > This interface is simply a way to set a scoped NO{IO,FS} context. > > The "Documentation/core-api/gfp_mask-from-fs-io.rst" is already very detail > about them all. > > This fixing just means to make sure that it won't surprise someone who is > having a quickly through some code and not familiar much about the detail. > It may make not much sense ? Ohh, I do not think this would be senseless. I just think that the NOIO implying NOFS as well should be described at the level where they are documented rather than the api you have chosen. -- Michal Hocko SUSE Labs