-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hugemmap34: change how test finds suitable huge page and stack for test
The test is trying to find a place for huge page with mmap(MAP_FIXED_NOREPLACE) starting at top of stack and going downwards until it succeeds. The problem is that before it finds one, it goes over other existing mappings. So, child process does crash when trying to extend stack, but not because it hits mapped huge page, it hits one of the existing mappings. This search is slow, specially on -debug kernels. This patch changes the test, by giving child process a separate stack that is always immediately above a huge page. Setup temporarily allocates huge pages and uses those addresses to map potential child stacks. When it allocates huge page and finds that mapping after it is one of child stacks, it uses that pair for the test. Signed-off-by: Jan Stancek <[email protected]> Reviewed-by: Cyril Hrubis <[email protected]> Reviewed-by: Wei Gao <[email protected]>
- Loading branch information
Showing
1 changed file
with
115 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters