Skip to content

Zend,fibers: Ensure fiber stack is not backed by THP. #13306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Zend/zend_fibers.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ static zend_fiber_stack *zend_fiber_stack_allocate(size_t size)
return NULL;
}

#if defined(MADV_NOHUGEPAGE)
/* Multiple reasons to fail, ignore all errors only needed
* for linux < 6.8 */
(void) madvise(pointer, alloc_size, MADV_NOHUGEPAGE);
#endif

zend_mmap_set_name(pointer, alloc_size, "zend_fiber_stack");

# if ZEND_FIBER_GUARD_PAGES
Expand Down