82a1b8ed56
This option increases the number of SLB misses by limiting the number of kernel SLB entries, and increased flushing of cached lookaside information. This helps stress test difficult to hit paths in the kernel. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Relocate the code into arch/powerpc/mm, s/torture/stress/] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200511125825.3081305-1-mpe@ellerman.id.au
17 lines
383 B
C
17 lines
383 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H
|
|
#define ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H
|
|
|
|
#include <linux/jump_label.h>
|
|
|
|
extern bool stress_slb_enabled;
|
|
|
|
DECLARE_STATIC_KEY_FALSE(stress_slb_key);
|
|
|
|
static inline bool stress_slb(void)
|
|
{
|
|
return static_branch_unlikely(&stress_slb_key);
|
|
}
|
|
|
|
#endif /* ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H */
|