Lines Matching refs:delta

70 static int hugetlb_acct_memory(struct hstate *h, long delta);
130 long delta) in hugepage_subpool_get_pages() argument
132 long ret = delta; in hugepage_subpool_get_pages()
140 if ((spool->used_hpages + delta) <= spool->max_hpages) in hugepage_subpool_get_pages()
141 spool->used_hpages += delta; in hugepage_subpool_get_pages()
149 if (delta > spool->rsv_hpages) { in hugepage_subpool_get_pages()
154 ret = delta - spool->rsv_hpages; in hugepage_subpool_get_pages()
158 spool->rsv_hpages -= delta; in hugepage_subpool_get_pages()
174 long delta) in hugepage_subpool_put_pages() argument
176 long ret = delta; in hugepage_subpool_put_pages()
179 return delta; in hugepage_subpool_put_pages()
184 spool->used_hpages -= delta; in hugepage_subpool_put_pages()
187 if (spool->rsv_hpages + delta <= spool->min_hpages) in hugepage_subpool_put_pages()
190 ret = spool->rsv_hpages + delta - spool->min_hpages; in hugepage_subpool_put_pages()
192 spool->rsv_hpages += delta; in hugepage_subpool_put_pages()
1642 static int gather_surplus_pages(struct hstate *h, int delta) in gather_surplus_pages() argument
1650 needed = (h->resv_huge_pages + delta) - h->free_huge_pages; in gather_surplus_pages()
1652 h->resv_huge_pages += delta; in gather_surplus_pages()
1677 needed = (h->resv_huge_pages + delta) - in gather_surplus_pages()
1698 h->resv_huge_pages += delta; in gather_surplus_pages()
2114 int delta) in adjust_pool_surplus() argument
2118 VM_BUG_ON(delta != -1 && delta != 1); in adjust_pool_surplus()
2120 if (delta < 0) { in adjust_pool_surplus()
2135 h->surplus_huge_pages += delta; in adjust_pool_surplus()
2136 h->surplus_huge_pages_node[node] += delta; in adjust_pool_surplus()
2920 static int hugetlb_acct_memory(struct hstate *h, long delta) in hugetlb_acct_memory() argument
2942 if (delta > 0) { in hugetlb_acct_memory()
2943 if (gather_surplus_pages(h, delta) < 0) in hugetlb_acct_memory()
2946 if (delta > cpuset_mems_nr(h->free_huge_pages_node)) { in hugetlb_acct_memory()
2947 return_unused_surplus_pages(h, delta); in hugetlb_acct_memory()
2953 if (delta < 0) in hugetlb_acct_memory()
2954 return_unused_surplus_pages(h, (unsigned long) -delta); in hugetlb_acct_memory()