Project

General

Profile

Actions

Feature #13834

open

want extensible page_resv

Added by Patrick Mooney 18 days ago. Updated 18 days ago.

Status:
In Progress
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Memory consumers such as segkmem and bhyve require pages which remain locked during the duration of the allocation. To ensure adequate pages are available prior to embarking on such a task, they currently use page_resv, which ensures that an adequate number of pages is set aside. This interface falls short in how it handles conditions when there are not enough free pages. If KM_SLEEP is specified, page_resv will conditionally sleep while waiting for reap activity to free up enough pages. If KM_NOSLEEP is passed instead, none of the memory pressure mechanisms employed in the KM_SLEEP case are used, and the page_resv call reports failure (provided that not enough free pages exist at the time). I propose adding page_xresv which calls into a provided wait_cb function when reaping for a KM_SLEEP reservation has begun. This will allow the caller to heed signals and potentially bail out of such an attempt if they decide that the wait for free pages has gone on too long.

Actions #1

Updated by Electric Monk 18 days ago

  • Gerrit CR set to 1522
Actions

Also available in: Atom PDF