* [PATCH] mm/page_alloc: avoid hard lockups in __alloc_pages_bulk()
@ 2021-07-10 11:29 qiang.zhang
2021-07-10 18:46 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: qiang.zhang @ 2021-07-10 11:29 UTC (permalink / raw)
To: mgorman, akpm; +Cc: linux-mm, linux-kernel
From: Zqiang <qiang.zhang@windriver.com>
The __alloc_pages_bulk() mainly used for batch allocation of
order-0 pages, in the case of holding pagesets.lock, if too
many pages are required, maybe trigger hard lockup watchdog.
Signed-off-by: Zqiang <qiang.zhang@windriver.com>
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d6e94cc8066c..1127db25507f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5315,6 +5315,8 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid,
else
page_array[nr_populated] = page;
nr_populated++;
+
+ touch_nmi_watchdog();
}
local_unlock_irqrestore(&pagesets.lock, flags);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/page_alloc: avoid hard lockups in __alloc_pages_bulk()
2021-07-10 11:29 [PATCH] mm/page_alloc: avoid hard lockups in __alloc_pages_bulk() qiang.zhang
@ 2021-07-10 18:46 ` Andrew Morton
2021-07-10 21:10 ` Matthew Wilcox
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2021-07-10 18:46 UTC (permalink / raw)
To: qiang.zhang; +Cc: mgorman, linux-mm, linux-kernel
On Sat, 10 Jul 2021 19:29:29 +0800 qiang.zhang@windriver.com wrote:
> From: Zqiang <qiang.zhang@windriver.com>
>
> The __alloc_pages_bulk() mainly used for batch allocation of
> order-0 pages, in the case of holding pagesets.lock, if too
> many pages are required, maybe trigger hard lockup watchdog.
Ouch. Has this been observed in testing? If so, can you please share
the kernel debug output from that event?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/page_alloc: avoid hard lockups in __alloc_pages_bulk()
2021-07-10 18:46 ` Andrew Morton
@ 2021-07-10 21:10 ` Matthew Wilcox
[not found] ` <BL1PR11MB54785E7EA2BFBDAA393F15BBFF179@BL1PR11MB5478.namprd11.prod.outlook.com>
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2021-07-10 21:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: qiang.zhang, mgorman, linux-mm, linux-kernel
On Sat, Jul 10, 2021 at 11:46:13AM -0700, Andrew Morton wrote:
> On Sat, 10 Jul 2021 19:29:29 +0800 qiang.zhang@windriver.com wrote:
>
> > From: Zqiang <qiang.zhang@windriver.com>
> >
> > The __alloc_pages_bulk() mainly used for batch allocation of
> > order-0 pages, in the case of holding pagesets.lock, if too
> > many pages are required, maybe trigger hard lockup watchdog.
>
> Ouch. Has this been observed in testing? If so, can you please share
> the kernel debug output from that event?
This should be fixed in the caller by asking for fewer pages.
The NFS and vmalloc cases have already been fixed for this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-15 8:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 11:29 [PATCH] mm/page_alloc: avoid hard lockups in __alloc_pages_bulk() qiang.zhang
2021-07-10 18:46 ` Andrew Morton
2021-07-10 21:10 ` Matthew Wilcox
[not found] ` <BL1PR11MB54785E7EA2BFBDAA393F15BBFF179@BL1PR11MB5478.namprd11.prod.outlook.com>
2021-07-15 8:35 ` Mel Gorman
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).