Lines Matching refs:delta
75 static int hugetlb_acct_memory(struct hstate *h, long delta);
135 long delta) in hugepage_subpool_get_pages() argument
137 long ret = delta; in hugepage_subpool_get_pages()
145 if ((spool->used_hpages + delta) <= spool->max_hpages) in hugepage_subpool_get_pages()
146 spool->used_hpages += delta; in hugepage_subpool_get_pages()
155 if (delta > spool->rsv_hpages) { in hugepage_subpool_get_pages()
160 ret = delta - spool->rsv_hpages; in hugepage_subpool_get_pages()
164 spool->rsv_hpages -= delta; in hugepage_subpool_get_pages()
180 long delta) in hugepage_subpool_put_pages() argument
182 long ret = delta; in hugepage_subpool_put_pages()
185 return delta; in hugepage_subpool_put_pages()
190 spool->used_hpages -= delta; in hugepage_subpool_put_pages()
194 if (spool->rsv_hpages + delta <= spool->min_hpages) in hugepage_subpool_put_pages()
197 ret = spool->rsv_hpages + delta - spool->min_hpages; in hugepage_subpool_put_pages()
199 spool->rsv_hpages += delta; in hugepage_subpool_put_pages()
1816 static int gather_surplus_pages(struct hstate *h, int delta) in gather_surplus_pages() argument
1824 needed = (h->resv_huge_pages + delta) - h->free_huge_pages; in gather_surplus_pages()
1826 h->resv_huge_pages += delta; in gather_surplus_pages()
1853 needed = (h->resv_huge_pages + delta) - in gather_surplus_pages()
1874 h->resv_huge_pages += delta; in gather_surplus_pages()
2397 int delta) in adjust_pool_surplus() argument
2401 VM_BUG_ON(delta != -1 && delta != 1); in adjust_pool_surplus()
2403 if (delta < 0) { in adjust_pool_surplus()
2418 h->surplus_huge_pages += delta; in adjust_pool_surplus()
2419 h->surplus_huge_pages_node[node] += delta; in adjust_pool_surplus()
3238 static int hugetlb_acct_memory(struct hstate *h, long delta) in hugetlb_acct_memory() argument
3260 if (delta > 0) { in hugetlb_acct_memory()
3261 if (gather_surplus_pages(h, delta) < 0) in hugetlb_acct_memory()
3264 if (delta > cpuset_mems_nr(h->free_huge_pages_node)) { in hugetlb_acct_memory()
3265 return_unused_surplus_pages(h, delta); in hugetlb_acct_memory()
3271 if (delta < 0) in hugetlb_acct_memory()
3272 return_unused_surplus_pages(h, (unsigned long) -delta); in hugetlb_acct_memory()