Return-Path: Received: from mx2.suse.de ([195.135.220.15]:53673 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937838AbdAIO3e (ORCPT ); Mon, 9 Jan 2017 09:29:34 -0500 Date: Mon, 9 Jan 2017 15:29:30 +0100 From: Michal Hocko To: Vlastimil Babka Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Dave Chinner , djwong@kernel.org, "Theodore Ts'o" , Chris Mason , David Sterba , Jan Kara , ceph-devel@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, logfs@logfs.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mtd@lists.infradead.org, reiserfs-devel@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, linux-f2fs-devel@lists.sourceforge.net, linux-afs@lists.infradead.org, LKML Subject: Re: [PATCH 2/8] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS Message-ID: <20170109142930.GL7495@dhcp22.suse.cz> References: <20170106141107.23953-1-mhocko@kernel.org> <20170106141107.23953-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org List-ID: On Mon 09-01-17 13:59:05, Vlastimil Babka wrote: > On 01/06/2017 03:11 PM, Michal Hocko wrote: > > From: Michal Hocko > > > > xfs has defined PF_FSTRANS to declare a scope GFP_NOFS semantic quite > > some time ago. We would like to make this concept more generic and use > > it for other filesystems as well. Let's start by giving the flag a > > more generic name PF_MEMALLOC_NOFS which is in line with an exiting > > PF_MEMALLOC_NOIO already used for the same purpose for GFP_NOIO > > contexts. Replace all PF_FSTRANS usage from the xfs code in the first > > step before we introduce a full API for it as xfs uses the flag directly > > anyway. > > > > This patch doesn't introduce any functional change. > > > > Signed-off-by: Michal Hocko > > Reviewed-by: Brian Foster > > Acked-by: Vlastimil Babka Thanks! > > A nit: > > > --- a/include/linux/sched.h > > +++ b/include/linux/sched.h > > @@ -2320,6 +2320,8 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, > > #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ > > #define PF_SUSPEND_TASK 0x80000000 /* this thread called freeze_processes and should not be frozen */ > > > > +#define PF_MEMALLOC_NOFS PF_FSTRANS /* Transition to a more generic GFP_NOFS scope semantic */ > > I don't see why this transition is needed, as there are already no users > of PF_FSTRANS after this patch. The next patch doesn't remove any more, > so this is just extra churn IMHO. But not a strong objection. I just wanted to have this transparent for the xfs in this patch. AFAIR Dave wanted to have xfs and generic parts separated. So it was the easiest to simply keep the flag and then remove it in a separate patach. -- Michal Hocko SUSE Labs