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()
1307 static int gather_surplus_pages(struct hstate *h, int delta) in gather_surplus_pages() argument
1315 needed = (h->resv_huge_pages + delta) - h->free_huge_pages; in gather_surplus_pages()
1317 h->resv_huge_pages += delta; in gather_surplus_pages()
1342 needed = (h->resv_huge_pages + delta) - in gather_surplus_pages()
1363 h->resv_huge_pages += delta; in gather_surplus_pages()
1700 int delta) in adjust_pool_surplus() argument
1704 VM_BUG_ON(delta != -1 && delta != 1); in adjust_pool_surplus()
1706 if (delta < 0) { in adjust_pool_surplus()
1721 h->surplus_huge_pages += delta; in adjust_pool_surplus()
1722 h->surplus_huge_pages_node[node] += delta; in adjust_pool_surplus()
2500 static int hugetlb_acct_memory(struct hstate *h, long delta) in hugetlb_acct_memory() argument
2522 if (delta > 0) { in hugetlb_acct_memory()
2523 if (gather_surplus_pages(h, delta) < 0) in hugetlb_acct_memory()
2526 if (delta > cpuset_mems_nr(h->free_huge_pages_node)) { in hugetlb_acct_memory()
2527 return_unused_surplus_pages(h, delta); in hugetlb_acct_memory()
2533 if (delta < 0) in hugetlb_acct_memory()
2534 return_unused_surplus_pages(h, (unsigned long) -delta); in hugetlb_acct_memory()