-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Hard coded "mm01 mmap001 -m 10000" in runtest/mm causes test failure #664
Comments
Maybe we can lower this value to 5000, I guess most systems have so much available memory. |
Hmmm... That could be too large for some aarch64 board as well. |
Maybe we can add a check in mmap01.c, ie hugetlb: limit hugepages according to MemAvailable. |
There could be even some API function to use |
Indeed there should be an API for figuring out how much memory a test can use, then we could use this function and divide it by a page size in this case. |
I will cleanup this case and add api to figure out the available memory . |
Any update on this issue? |
@xuyang0410 have you had time to look into this? |
I plan to pick up msgstress case again and then look into this case in November if nobody does it. |
In runtest/mm, mm01 is defined as "mmap001 -m 10000", here the pages is set to 10000.
Normally, PAGE_SIZE = 4KB, so 40MB of mmap will be tested, but if a kernel has set PAGE_SIZE to 64KB, 10000 x 64KB = 640MB, this may exceed available memory in the system and cause failures.
For example: in a aarch64 system:
<<<test_start>>>
tag=mm01 stime=1565786038
cmdline="mmap001 -m 10000"
contacts=""
analysis=exit
<<<test_output>>>
mmap001 0 TINFO : mmap()ing file of 10000 pages or 655360000 bytes
mmap001 1 TPASS : mmap() completed successfully.
mmap001 0 TINFO : touching mmaped memory
mmap001 2 TBROK : tst_sig.c:233: unexpected signal SIGBUS(7) received (pid = 27075).
mmap001 3 TBROK : tst_sig.c:233: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=36 termination_type=exited termination_id=2 corefile=no
cutime=48 cstime=53
<<<test_end>>>
The text was updated successfully, but these errors were encountered: