From: Michal Hocko <mhocko@kernel.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API
Date: Wed, 27 Apr 2016 23:14:14 +0200 [thread overview]
Message-ID: <20160427211414.GA24919@dhcp22.suse.cz> (raw)
In-Reply-To: <1461758075-21815-2-git-send-email-mhocko@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 at dhcp22.suse.cz
---
From 1968c0a8ace4090a9deca8f4c1a206ee546e595a Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@suse.com>
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 <mhocko@suse.com>
---
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
next prev parent reply other threads:[~2016-04-27 21:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 11:56 [Cluster-devel] [PATCH 0/2] scop GFP_NOFS api Michal Hocko
2016-04-26 11:56 ` [Cluster-devel] [PATCH 1/2] mm: add PF_MEMALLOC_NOFS Michal Hocko
2016-04-26 23:07 ` Dave Chinner
2016-04-27 7:51 ` Michal Hocko
2016-04-27 11:54 ` [Cluster-devel] [PATCH 1.1/2] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS Michal Hocko
2016-04-27 11:54 ` [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API Michal Hocko
2016-04-27 13:07 ` Michal Hocko
2016-04-27 20:09 ` Michal Hocko
2016-04-27 20:30 ` Michal Hocko
2016-04-27 21:14 ` Michal Hocko [this message]
2016-04-27 17:41 ` [Cluster-devel] [PATCH 1.1/2] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS Andreas Dilger
2016-04-27 19:43 ` Michal Hocko
2016-04-26 11:56 ` [Cluster-devel] [PATCH 2/2] mm, debug: report when GFP_NO{FS, IO} is used explicitly from memalloc_no{fs, io}_{save, restore} context Michal Hocko
2016-04-26 22:58 ` Dave Chinner
2016-04-27 8:03 ` Michal Hocko
2016-04-27 22:55 ` Dave Chinner
2016-04-29 5:35 ` [Cluster-devel] [PATCH 0/2] scop GFP_NOFS api NeilBrown
2016-04-29 10:20 ` Steven Whitehouse
2016-04-30 21:17 ` NeilBrown
2016-04-29 12:04 ` Michal Hocko
2016-04-30 0:24 ` Dave Chinner
2016-04-30 21:55 ` NeilBrown
2016-05-03 15:13 ` Michal Hocko
2016-05-03 23:26 ` NeilBrown
2016-04-30 0:11 ` Dave Chinner
2016-04-30 22:19 ` NeilBrown
2016-05-04 1:00 ` Dave Chinner
2016-05-06 3:20 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160427211414.GA24919@dhcp22.suse.cz \
--to=mhocko@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).