linux-stable/tools/include/linux
Liam R. Howlett 099d7439ce maple_tree: add GFP_KERNEL to allocations in mas_expected_entries()
Users complained about OOM errors during fork without triggering
compaction.  This can be fixed by modifying the flags used in
mas_expected_entries() so that the compaction will be triggered in low
memory situations.  Since mas_expected_entries() is only used during fork,
the extra argument does not need to be passed through.

Additionally, the two test_maple_tree test cases and one benchmark test
were altered to use the correct locking type so that allocations would not
trigger sleeping and thus fail.  Testing was completed with lockdep atomic
sleep detection.

The additional locking change requires rwsem support additions to the
tools/ directory through the use of pthreads pthread_rwlock_t.  With this
change test_maple_tree works in userspace, as a module, and in-kernel.

Users may notice that the system gave up early on attempting to start new
processes instead of attempting to reclaim memory.

Link: https://lkml.kernel.org/r/20230915093243epcms1p46fa00bbac1ab7b7dca94acb66c44c456@epcms1p4
Link: https://lkml.kernel.org/r/20231012155233.2272446-1-Liam.Howlett@oracle.com
Fixes: 54a611b605 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: <jason.sim@samsung.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-10-18 12:12:41 -07:00
..
sched
unaligned
arm-smccc.h
atomic.h
bitfield.h
bitmap.h tools: Drop conflicting non-atomic test_and_{clear,set}_bit() helpers 2022-12-02 13:22:34 -05:00
bitops.h
bits.h
btf_ids.h bpf: Fix BTF_ID symbol generation collision in tools/ 2023-09-15 12:08:27 -07:00
bug.h
build_bug.h
cache.h
compiler_types.h
compiler-gcc.h tools: Rename __fallthrough to fallthrough 2023-04-06 21:41:00 -03:00
compiler.h tools include: Add some common function attributes 2023-08-04 17:36:52 +01:00
const.h
coresight-pmu.h perf cs-etm: Copy kernel coresight-pmu.h header 2023-05-26 16:03:27 -03:00
ctype.h
debugfs.h
delay.h
err.h docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
export.h module: remove EXPORT_UNUSED_SYMBOL* 2021-02-08 12:28:07 +01:00
filter.h
find.h
ftrace.h
gfp_types.h
gfp.h
hash.h
hashtable.h
interrupt.h
interval_tree_generic.h
io.h
jhash.h
kallsyms.h kallsyms: increase maximum kernel symbol length to 512 2022-09-28 08:56:25 +02:00
kconfig.h
kern_levels.h
kernel.h
linkage.h
list_sort.h
list.h
log2.h
math64.h
math.h
mm.h memblock tests: fix warning: "__ALIGN_KERNEL" redefined 2023-09-14 09:26:14 +03:00
module.h
mutex.h
nmi.h
numa.h tools/: replace open encodings for NUMA_NO_NODE 2019-03-05 21:07:14 -08:00
objtool_types.h x86,objtool: Split UNWIND_HINT_EMPTY in two 2023-03-23 23:18:58 +01:00
overflow.h
pfn.h
poison.h
rbtree_augmented.h
rbtree.h
rcu.h
refcount.h
ring_buffer.h
rwsem.h maple_tree: add GFP_KERNEL to allocations in mas_expected_entries() 2023-10-18 12:12:41 -07:00
seq_file.h memblock tests: fix warning ‘struct seq_file’ declared inside parameter list 2023-09-14 10:51:28 +03:00
sizes.h
slab.h
spinlock.h
static_call_types.h
string.h
stringify.h
time64.h
types.h tools/virtio: fix build caused by virtio_ring changes 2023-04-21 03:02:35 -04:00
zalloc.h