Function report |
Source Code:mm\hugetlb.c |
Create Date:2022-07-28 15:26:40 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Increase the hugetlb pool such that it can accommodate a reservation* of size 'delta'.
Proto:static int gather_surplus_pages(struct hstate *h, int delta)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct hstate * | h | |
int | delta |
1703 | bool alloc_ok = true |
1705 | needed = resv_huge_pages + delta - free_huge_pages |
1706 | If needed <= 0 Then |
1707 | resv_huge_pages += delta |
1708 | Return 0 |
1711 | allocated = 0 |
1715 | retry : |
1716 | spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
1733 | spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
1734 | needed = resv_huge_pages + delta - free_huge_pages + allocated |
1736 | If needed > 0 Then |
1755 | resv_huge_pages += delta |
1756 | ret = 0 |
1760 | If --needed < 0 Then Break |
1767 | VM_BUG_ON_PAGE(page_count(page), page) |
1768 | enqueue_huge_page(h, page) |
1770 | free : |
1771 | spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
1776 | spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
1778 | Return ret |
Name | Describe |
---|---|
hugetlb_acct_memory | Forward declaration |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |