aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2025-01-07 15:39:57 -0500
committerAndrew Morton <akpm@linux-foundation.org>2025-01-25 20:22:30 -0800
commitbe8d7314b18ede1c6cdebbb982c9659020e2f1f2 (patch)
treef4bf8c38fcc0c23fa814db5d05e12685b8236116 /include/linux/hugetlb.h
parentmm/hugetlb: fix avoid_reserve to allow taking folio from subpool (diff)
downloadwireguard-linux-be8d7314b18ede1c6cdebbb982c9659020e2f1f2.tar.xz
wireguard-linux-be8d7314b18ede1c6cdebbb982c9659020e2f1f2.zip
mm/hugetlb: stop using avoid_reserve flag in fork()
When fork() and stumble on top of a dma-pinned hugetlb private page, CoW must happen during fork() to guarantee dma coherency. In this specific path, hugetlb pages need to be allocated for the child process. Stop using avoid_reserve=1 flag here: it's not required to be used here, as dest_vma (which is destined to be a MAP_PRIVATE hugetlb vma) will have no private vma resv map, and that will make sure it won't be able to use a vma reservation later. No functional change intended with this change. Said that, it's still wanted to do this, so as to reduce the usage of avoid_reserve to the only one user, which is also why this flag was introduced initially in commit 04f2cbe35699 ("hugetlb: guarantee that COW faults for a process that called mmap(MAP_PRIVATE) on hugetlbfs will succeed"). I don't see whoever else should set it at all. Further patch will clean up resv accounting based on this. Link: https://lkml.kernel.org/r/20250107204002.2683356-3-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Cc: Ackerley Tng <ackerleytng@google.com> Cc: Breno Leitao <leitao@debian.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Naoya Horiguchi <nao.horiguchi@gmail.com> Cc: Rik van Riel <riel@surriel.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/hugetlb.h')
0 files changed, 0 insertions, 0 deletions