git: 10f2e94acc1e - main - vm_page_reclaim_contig(): update comment to chase recent changes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 02 Jan 2024 21:43:30 UTC
The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=10f2e94acc1e1f01f9342a99cbf28708525885c3 commit 10f2e94acc1e1f01f9342a99cbf28708525885c3 Author: Jason A. Harmening <jah@FreeBSD.org> AuthorDate: 2024-01-02 21:33:59 +0000 Commit: Jason A. Harmening <jah@FreeBSD.org> CommitDate: 2024-01-02 21:39:36 +0000 vm_page_reclaim_contig(): update comment to chase recent changes Commit 2619c5ccfe ("Avoid waiting on physical allocations that can't possibly be satisfied") changed the return value from bool to errno. Adjust the function description to match reality. --- sys/vm/vm_page.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 72057f2fc9f5..4429ec067673 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -3014,11 +3014,13 @@ unlock: * * Reclaim allocated, contiguous physical memory satisfying the specified * conditions by relocating the virtual pages using that physical memory. - * Returns true if reclamation is successful and false otherwise. Since + * Returns 0 if reclamation is successful, ERANGE if the specified domain + * can't possibly satisfy the reclamation request, or ENOMEM if not + * currently able to reclaim the requested number of pages. Since * relocation requires the allocation of physical pages, reclamation may - * fail due to a shortage of free pages. When reclamation fails, callers - * are expected to perform vm_wait() before retrying a failed allocation - * operation, e.g., vm_page_alloc_contig(). + * fail with ENOMEM due to a shortage of free pages. When reclamation + * fails in this manner, callers are expected to perform vm_wait() before + * retrying a failed allocation operation, e.g., vm_page_alloc_contig(). * * The caller must always specify an allocation class through "req". *