-
Notifications
You must be signed in to change notification settings - Fork 8k
Remove guard pages from fibers and alternative stack for signals in threads #79147
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
Conversation
ee7e3a5 to
c6dbaad
Compare
|
Same effort in #73510. In upstream PR we use |
You did it not only for fibers, so let's adjust the PR description and title |
This is a good idea with respect to how many times we increased the stack size for fibers: @CheSema WDYT? Maybe we just need to proceed with #73510 them? @canhld94 we can avoid using mmap at all and simply install guard pages inside the aligned allocation, should work |
This PR is created as a fix for an issue. Make guarded pages with some probability in release is great idea. We could do it after. Cache for allocations. Also good idea. I have some question there. It is already in progress, it would be discussed and merged in its PR. |
0bf732d to
a117179
Compare
a117179 to
3fbd6e0
Compare
|
@CheSema the description is too low level, how about something like this?
|
I think we just need a pool of stacks with guard page, when the pool is full, we use normal allocator. |
Co-authored-by: Azat Khuzhin <[email protected]>
Co-authored-by: Azat Khuzhin <[email protected]>
Co-authored-by: Azat Khuzhin <[email protected]>
Co-authored-by: Azat Khuzhin <[email protected]>
Co-authored-by: Azat Khuzhin <[email protected]>
Co-authored-by: Azat Khuzhin <[email protected]>
azat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (don't forget to update the PR title, right now it says only about fibers)
Cherry pick #79147 to 25.4: Remove guard pages from fibers and alternative stack for signals in threads
…ve stack for signals in threads
Backport #79147 to 25.4: Remove guard pages from fibers and alternative stack for signals in threads
…ack-protection stack allocation in Fiber and alternative stack for signals
25.3.5 Backport of ClickHouse#79147: Remove guard pages from fibers and alternative stack for signals in threads
…ack-protection stack allocation in Fiber and alternative stack for signals
25.3.6 Backport of ClickHouse#79147: Remove guard pages from fibers and alternative stack for signals in threads
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Remove guard pages for threads and async_socket_for_remote/use_hedge_requests. Change the allocation method in
FiberStackfrommmaptoaligned_alloc. Since this splits VMAs and under heavy load vm.max_map_count can be reached.Documentation entry for user-facing changes