RFC add support for free hugepage reporting
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | mm: support hugetlb free page reportinginclude/ include/ mm/ +2 more | +358 | 10 replies | |
| 2/3 | virtio-balloon: add support for providing free huge page reports to hostdrivers/ include/ | +62 | 2 replies | |
| 3/3 | mm: support free hugepage pre zero outmm/ | +17 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3 updated] add support for free hugepage reporting
A typical usage of hugetlbfs it's to reserve amount of memory during kernel booting, and the reserved pages are unlikely to return to the buddy system. When application need hugepages, kernel will allocate them from the reserved pool. when application terminates, huge pages will return to the reserved pool and are kept in the free list for hugetlb, these free pages will not return to buddy freelist unless the size fo reserved pool is changed.
Free page reporting only supports buddy pages, it can't report the free pages reserved for hugetlbfs. On the other hand, hugetlbfs is a good choice for system with a huge amount of RAM, because it can help to reduce the memory management overhead and improve system performance.
This patch add the support for reporting hugepages in the free list of hugetlb, it can be used by virtio_balloon driver for memory overcommit and pre zero out free pages for speeding up memory population and page fault handling.
Most of the code are 'copied' from free page reporting because they are working in the same way. So the code can be refined to remove the duplicated code. Since this is an RFC, I didn't do that.
For the virtio_balloon driver, changes for the virtio spec are needed. Before that, I need the feedback of the comunity about this new feature.
This RFC is baed on my previous series:
'[RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO'
Liang Li (3):
mm: support hugetlb free page reporting
virtio-balloon: add support for providing free huge page reports to
host
mm: support free hugepage pre zero out
drivers/virtio/virtio_balloon.c | 61 ++++++ include/linux/hugetlb.h | 3 + include/linux/page_reporting.h | 5 + include/uapi/linux/virtio_balloon.h | 1 + mm/hugetlb.c | 29 +++ mm/page_prezero.c | 17 ++ mm/page_reporting.c | 287 ++++++++++++++++++++++++++++ mm/page_reporting.h | 34 ++++ 8 files changed, 437 insertions(+)
Signature · 1 line
2.18.2