mm: slub: Don't resize the location tracking cache on PREEMPT_RT

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.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
(cherry picked from commit 87bd0bf324f4c5468ea3d1de0482589f491f3145)
Signed-off-by: Clark Williams <williams@redhat.com>
This commit is contained in:
Sebastian Andrzej Siewior
2021-02-26 17:26:04 +01:00
committed by jianlong.wang
parent 57caeb1a48
commit 8343170476

View File

@@ -4632,6 +4632,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);