Remove guard pages from fibers and alternative stack for signals in threads - #79147
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 <a3at.mail@gmail.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
azat
left a comment
There was a problem hiding this comment.
LGTM (don't forget to update the PR title, right now it says only about fibers)
…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
24.8.14 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