aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_helpers_doc.py
diff options
context:
space:
mode:
authorMina Almasry <[email protected]>2020-04-01 21:11:21 -0700
committerLinus Torvalds <[email protected]>2020-04-02 09:35:32 -0700
commite9fe92ae0cd28aac5cf6d3fb8442825c22fbd3a6 (patch)
treef1d2a4dbf5b2e21a1ca222a57b05ef104cf42504 /scripts/bpf_helpers_doc.py
parent9808895e1a4416ffb9b3a0a121d81afc5a23c18b (diff)
hugetlb_cgroup: add reservation accounting for private mappings
Normally the pointer to the cgroup to uncharge hangs off the struct page, and gets queried when it's time to free the page. With hugetlb_cgroup reservations, this is not possible. Because it's possible for a page to be reserved by one task and actually faulted in by another task. The best place to put the hugetlb_cgroup pointer to uncharge for reservations is in the resv_map. But, because the resv_map has different semantics for private and shared mappings, the code patch to charge/uncharge shared and private mappings is different. This patch implements charging and uncharging for private mappings. For private mappings, the counter to uncharge is in resv_map->reservation_counter. On initializing the resv_map this is set to NULL. On reservation of a region in private mapping, the tasks hugetlb_cgroup is charged and the hugetlb_cgroup is placed is resv_map->reservation_counter. On hugetlb_vm_op_close, we uncharge resv_map->reservation_counter. [[email protected]: forward declare struct resv_map] Signed-off-by: Mina Almasry <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Greg Thelen <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Shakeel Butt <[email protected]> Cc: Shuah Khan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions