On 02.12.2024 11:49, Muchun Song wrote:
On Dec 1, 2024, at 09:03, Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxx> wrote:
The error ENOSPC is translated in vmf_error to VM_FAULT_SIGBUS which is
further translated in EFAULT in i.e. pin/get_user_pages.
But when running out of pages/hugepages we expect to see ENOMEM and
not EFAULT.
Hi Dafna,
Refers to Documentation/mm/hugetlbfs_reserv.rst. I saw:
If no huge page exists at page fault time, the task is sent
a **SIGBUS** and often dies an unhappy death.
Seems SIGBUS is expected since it is introduced.
Ok, but for functions such as pin/get_user_pages, it is translated to EFAULT,
which is not clear if this is what we want.
Thanks.