diff options
| author | Adam Litke <[email protected]> | 2007-11-14 16:59:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-11-14 18:45:40 -0800 |
| commit | 90d8b7e6129e8f4e5b3bc1a2cfbe585372ce8646 (patch) | |
| tree | 7a078249e1a468dc3ec5973c14f8f6a95cb0620f /include | |
| parent | 9a119c056dc2a9970901954a6d561d50a95e528d (diff) | |
hugetlb: enforce quotas during reservation for shared mappings
When a MAP_SHARED mmap of a hugetlbfs file succeeds, huge pages are reserved
to guarantee no problems will occur later when instantiating pages. If quotas
are in force, page instantiation could fail due to a race with another process
or an oversized (but approved) shared mapping.
To prevent these scenarios, debit the quota for the full reservation amount up
front and credit the unused quota when the reservation is released.
Signed-off-by: Adam Litke <[email protected]>
Cc: Ken Chen <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: David Gibson <[email protected]>
Cc: William Lee Irwin III <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions