[SERVER-4667] Improve support for mincore() Created: 12/Jan/12  Updated: 06/Dec/22  Resolved: 14/Sep/18

Status: Closed
Project: Core Server
Component/s: MMAPv1, Stability
Affects Version/s: 2.1.0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ben Becker Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: mmap
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

POSIX (Darwin and Linux)


Issue Links:
Related
is related to SERVER-3635 for non in mem yielding, touch / chec... Closed
is related to SERVER-3711 Record::touch with entireRecord true ... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

ProcessInfo::blockInMemory(char *start) does not appropriately account for a block of memory. The following logic disregards where the address was within the page:

        start = start - ( (unsigned long long)start % pageSize );

While it may be unlikely we would need to call this function with an unaligned address, it could cause unexpected results when an unaligned start address is passed in. Additionally, this function only checks a single page (128 bytes, which gets rounded up to the next page boundry), although ranges are supported by mincore() on Linux and Darwin. Perhaps it's worth adding an optional length parameter and ensuring support for memory that spans multiple pages?


Generated at Thu Feb 08 03:06:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.