From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:36498 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbcD0VOS (ORCPT ); Wed, 27 Apr 2016 17:14:18 -0400 Date: Wed, 27 Apr 2016 23:14:14 +0200 From: Michal Hocko To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Andrew Morton , Dave Chinner , "Theodore Ts'o" , Chris Mason , Jan Kara , ceph-devel@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, logfs@logfs.org, xfs@oss.sgi.com, 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 1.2/2] mm: introduce memalloc_nofs_{save,restore} API Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> References: <1461671772-1269-2-git-send-email-mhocko@kernel.org> <1461758075-21815-1-git-send-email-mhocko@kernel.org> <1461758075-21815-2-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@kernel.org> Sender: linux-btrfs-owner@vger.kernel.org List-ID: OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.GC22544@dhcp22.suse.cz --- >>From 1968c0a8ace4090a9deca8f4c1a206ee546e595a Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Wed, 27 Apr 2016 22:32:57 +0200 Subject: [PATCH] fold me "mm: introduce memalloc_nofs_{save,restore} API" Lockdep infrastructure is hooked into early hot paths of the allocator so __lockdep_trace_alloc has to check for PF_MEMALLOC_NOFS directly and do not rely on current_gfp_context Signed-off-by: Michal Hocko --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 716547fdb873..f60124d0871c 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2750,7 +2750,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags) return; /* We're only interested __GFP_FS allocations for now */ - if (!(gfp_mask & __GFP_FS)) + if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS)) return; /* -- 2.8.0.rc3 -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 27 Apr 2016 23:14:14 +0200 From: Michal Hocko To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Andrew Morton , Dave Chinner , Theodore Ts'o , Chris Mason , Jan Kara , ceph-devel@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, logfs@logfs.org, xfs@oss.sgi.com, 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 1.2/2] mm: introduce memalloc_nofs_{save,restore} API Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> References: <1461671772-1269-2-git-send-email-mhocko@kernel.org> <1461758075-21815-1-git-send-email-mhocko@kernel.org> <1461758075-21815-2-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.GC22544@dhcp22.suse.cz --- >>From 1968c0a8ace4090a9deca8f4c1a206ee546e595a Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Wed, 27 Apr 2016 22:32:57 +0200 Subject: [PATCH] fold me "mm: introduce memalloc_nofs_{save,restore} API" Lockdep infrastructure is hooked into early hot paths of the allocator so __lockdep_trace_alloc has to check for PF_MEMALLOC_NOFS directly and do not rely on current_gfp_context Signed-off-by: Michal Hocko --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 716547fdb873..f60124d0871c 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2750,7 +2750,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags) return; /* We're only interested __GFP_FS allocations for now */ - if (!(gfp_mask & __GFP_FS)) + if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS)) return; /* -- 2.8.0.rc3 -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 591367D29 for ; Wed, 27 Apr 2016 16:14:24 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay2.corp.sgi.com (Postfix) with ESMTP id 0D083304039 for ; Wed, 27 Apr 2016 14:14:20 -0700 (PDT) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by cuda.sgi.com with ESMTP id 035KkpzS8nNeMkcp (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 27 Apr 2016 14:14:17 -0700 (PDT) Received: by mail-wm0-f66.google.com with SMTP id n129so7523000wmn.1 for ; Wed, 27 Apr 2016 14:14:17 -0700 (PDT) Date: Wed, 27 Apr 2016 23:14:14 +0200 From: Michal Hocko Subject: Re: [PATCH 1.2/2] mm: introduce memalloc_nofs_{save,restore} API Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> References: <1461671772-1269-2-git-send-email-mhocko@kernel.org> <1461758075-21815-1-git-send-email-mhocko@kernel.org> <1461758075-21815-2-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@kernel.org> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: linux-nfs@vger.kernel.org, linux-ext4@vger.kernel.org, Theodore Ts'o , linux-ntfs-dev@lists.sourceforge.net, LKML , reiserfs-devel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, logfs@logfs.org, cluster-devel@redhat.com, Chris Mason , linux-mtd@lists.infradead.org, Jan Kara , Andrew Morton , xfs@oss.sgi.com, ceph-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-afs@lists.infradead.org OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.GC22544@dhcp22.suse.cz --- >>From 1968c0a8ace4090a9deca8f4c1a206ee546e595a Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Wed, 27 Apr 2016 22:32:57 +0200 Subject: [PATCH] fold me "mm: introduce memalloc_nofs_{save,restore} API" Lockdep infrastructure is hooked into early hot paths of the allocator so __lockdep_trace_alloc has to check for PF_MEMALLOC_NOFS directly and do not rely on current_gfp_context Signed-off-by: Michal Hocko --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 716547fdb873..f60124d0871c 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2750,7 +2750,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags) return; /* We're only interested __GFP_FS allocations for now */ - if (!(gfp_mask & __GFP_FS)) + if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS)) return; /* -- 2.8.0.rc3 -- Michal Hocko SUSE Labs _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:36498 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbcD0VOS (ORCPT ); Wed, 27 Apr 2016 17:14:18 -0400 Date: Wed, 27 Apr 2016 23:14:14 +0200 From: Michal Hocko To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Andrew Morton , Dave Chinner , "Theodore Ts'o" , Chris Mason , Jan Kara , ceph-devel@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, logfs@logfs.org, xfs@oss.sgi.com, 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 1.2/2] mm: introduce memalloc_nofs_{save,restore} API Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> References: <1461671772-1269-2-git-send-email-mhocko@kernel.org> <1461758075-21815-1-git-send-email-mhocko@kernel.org> <1461758075-21815-2-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@kernel.org> Sender: linux-nfs-owner@vger.kernel.org List-ID: OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.GC22544@dhcp22.suse.cz --- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH 1.2/2] mm: introduce memalloc_nofs_{save,restore} API Date: Wed, 27 Apr 2016 23:14:14 +0200 Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> References: <1461671772-1269-2-git-send-email-mhocko@kernel.org> <1461758075-21815-1-git-send-email-mhocko@kernel.org> <1461758075-21815-2-git-send-email-mhocko@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@kernel.org> Sender: reiserfs-devel-owner@vger.kernel.org To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Andrew Morton , Dave Chinner , Theodore Ts'o , Chris Mason , Jan Kara , ceph-devel@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, logfs@logfs.org, xfs@oss.sgi.com, 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 List-Id: ceph-devel.vger.kernel.org OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.GC22544@dhcp22.suse.cz --- >From 1968c0a8ace4090a9deca8f4c1a206ee546e595a Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Wed, 27 Apr 2016 22:32:57 +0200 Subject: [PATCH] fold me "mm: introduce memalloc_nofs_{save,restore} API" Lockdep infrastructure is hooked into early hot paths of the allocator so __lockdep_trace_alloc has to check for PF_MEMALLOC_NOFS directly and do not rely on current_gfp_context Signed-off-by: Michal Hocko --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 716547fdb873..f60124d0871c 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2750,7 +2750,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags) return; /* We're only interested __GFP_FS allocations for now */ - if (!(gfp_mask & __GFP_FS)) + if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS)) return; /* -- 2.8.0.rc3 -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Date: Wed, 27 Apr 2016 23:14:14 +0200 Subject: [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@kernel.org> References: <1461671772-1269-2-git-send-email-mhocko@kernel.org> <1461758075-21815-1-git-send-email-mhocko@kernel.org> <1461758075-21815-2-git-send-email-mhocko@kernel.org> Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.GC22544 at dhcp22.suse.cz --- >From 1968c0a8ace4090a9deca8f4c1a206ee546e595a Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Wed, 27 Apr 2016 22:32:57 +0200 Subject: [PATCH] fold me "mm: introduce memalloc_nofs_{save,restore} API" Lockdep infrastructure is hooked into early hot paths of the allocator so __lockdep_trace_alloc has to check for PF_MEMALLOC_NOFS directly and do not rely on current_gfp_context Signed-off-by: Michal Hocko --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 716547fdb873..f60124d0871c 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2750,7 +2750,7 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags) return; /* We're only interested __GFP_FS allocations for now */ - if (!(gfp_mask & __GFP_FS)) + if (!(gfp_mask & __GFP_FS) || (curr->flags & PF_MEMALLOC_NOFS)) return; /* -- 2.8.0.rc3 -- Michal Hocko SUSE Labs