mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Created tunable to force small pages on stack allocation.
Created tunable glibc.pthread.stack_hugetlb to control when hugepages can be used for stack allocation. In case THP are enabled and glibc.pthread.stack_hugetlb is set to 0, glibc will madvise the kernel not to use allow hugepages for stack allocations. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
committed by
Adhemerval Zanella
parent
0f61cd4b9c
commit
b630be0922
@@ -27,6 +27,9 @@
|
||||
/* Maximum size of the cache, in bytes. 40 MiB by default. */
|
||||
extern size_t __nptl_stack_cache_maxsize attribute_hidden;
|
||||
|
||||
/* Should allow stacks to use hugetlb. (1) is default. */
|
||||
extern int32_t __nptl_stack_hugetlb;
|
||||
|
||||
/* Check whether the stack is still used or not. */
|
||||
static inline bool
|
||||
__nptl_stack_in_use (struct pthread *pd)
|
||||
|
||||
Reference in New Issue
Block a user