From d3f261aad58dac8596c9524a2565e5658a3de93e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 26 Feb 2021 17:26:04 +0100 Subject: [PATCH 201/323] mm: slub: Don't resize the location tracking cache on PREEMPT_RT Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.215-rt107.tar.xz The location tracking cache has a size of a page and is resized if its current size is too small. This allocation happens with disabled interrupts and can't happen on PREEMPT_RT. Should one page be too small, then we have to allocate more at the beginning. The only downside is that less callers will be visible. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- mm/slub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index cb414c1f9ef6b..57c598dd7454e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4682,6 +4682,9 @@ static int alloc_loc_track(struct loc_track *t, unsigned long max, gfp_t flags) struct location *l; int order; + if (IS_ENABLED(CONFIG_PREEMPT_RT) && flags == GFP_ATOMIC) + return 0; + order = get_order(sizeof(struct location) * max); l = (void *)__get_free_pages(flags, order); -- 2.44.0