From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, vbabka@suse.cz, rostedt@goodmis.org,
jirislaby@kernel.org, gregkh@linuxfoundation.org,
akinobu.mita@gmail.com, zhengqi.arch@bytedance.com,
akpm@linux-foundation.org
Subject: + mm-fix-missing-handler-for-__gfp_nowarn-v2.patch added to mm-unstable branch
Date: Wed, 11 May 2022 11:28:28 -0700 [thread overview]
Message-ID: <20220511182829.33338C340EE@smtp.kernel.org> (raw)
The patch titled
Subject: mm-fix-missing-handler-for-__gfp_nowarn-v2
has been added to the -mm mm-unstable branch. Its filename is
mm-fix-missing-handler-for-__gfp_nowarn-v2.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-fix-missing-handler-for-__gfp_nowarn-v2.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Qi Zheng <zhengqi.arch@bytedance.com>
Subject: mm-fix-missing-handler-for-__gfp_nowarn-v2
- add comment to WARN_ON_ONCE_GFP
- handle __alloc_contig_migrate_range() case
- do not deal with:
WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));
Link: https://lkml.kernel.org/r/20220511061951.1114-1-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/internal.h | 4 ++++
mm/page_alloc.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/mm/internal.h~mm-fix-missing-handler-for-__gfp_nowarn-v2
+++ a/mm/internal.h
@@ -35,6 +35,10 @@ struct folio_batch;
/* Do not use these with a slab allocator */
#define GFP_SLAB_BUG_MASK (__GFP_DMA32|__GFP_HIGHMEM|~__GFP_BITS_MASK)
+/*
+ * Different from WARN_ON_ONCE(), no warning will be issued
+ * when we specify __GFP_NOWARN.
+ */
#define WARN_ON_ONCE_GFP(cond, gfp) ({ \
static bool __section(".data.once") __warned; \
int __ret_warn_once = !!(cond); \
--- a/mm/page_alloc.c~mm-fix-missing-handler-for-__gfp_nowarn-v2
+++ a/mm/page_alloc.c
@@ -3712,7 +3712,7 @@ struct page *rmqueue(struct zone *prefer
* We most definitely don't want callers attempting to
* allocate greater than order-1 page units with __GFP_NOFAIL.
*/
- WARN_ON_ONCE_GFP((gfp_flags & __GFP_NOFAIL) && (order > 1), gfp_flags);
+ WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));
do {
page = NULL;
@@ -9022,7 +9022,7 @@ int __alloc_contig_migrate_range(struct
lru_cache_enable();
if (ret < 0) {
- if (ret == -EBUSY)
+ if (!(cc->gfp_mask & __GFP_NOWARN) && ret == -EBUSY)
alloc_contig_dump_pages(&cc->migratepages);
putback_movable_pages(&cc->migratepages);
return ret;
_
Patches currently in -mm which might be from zhengqi.arch@bytedance.com are
mm-fix-missing-handler-for-__gfp_nowarn.patch
mm-fix-missing-handler-for-__gfp_nowarn-v2.patch
tty-fix-deadlock-caused-by-calling-printk-under-tty_port-lock.patch
reply other threads:[~2022-05-11 18:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220511182829.33338C340EE@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=akinobu.mita@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=vbabka@suse.cz \
--cc=zhengqi.arch@bytedance.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.