Lines Matching defs:npages

509 page_free_large_ctr(pgcnt_t npages)
514 freemem += npages;
516 lump = roundup(npages, pcf_fanout) / pcf_fanout;
518 while (npages > 0) {
522 if (lump < npages) {
524 npages -= lump;
526 p->pcf_count += (uint_t)npages;
527 npages = 0;
536 ASSERT(npages == 0);
1423 page_needfree(spgcnt_t npages)
1426 needfree += npages;
1457 page_create_throttle(pgcnt_t npages, int flags)
1468 return (freemem >= npages + throttlefree);
1489 return (freemem >= npages + pageout_reserve);
1507 if (freemem >= npages + tf) {
1511 needfree += npages;
1515 needfree -= npages;
1529 page_create_wait(pgcnt_t npages, uint_t flags)
1538 * We set needfree += npages before prodding pageout, to make sure
1539 * it does real work when npages > lotsfree > freemem.
1546 kcage_freemem < kcage_throttlefree + npages)
1547 (void) kcage_create_throttle(npages, flags);
1549 if (freemem < npages + throttlefree)
1550 if (!page_create_throttle(npages, flags))
1553 if (pcf_decrement_bucket(npages) ||
1554 pcf_decrement_multiple(&total, npages, 0))
1559 * to satisfy the request (npages < total).
1577 "page_create_nomem:npages %ld freemem %ld", npages, freemem);
1603 needfree += npages;
1609 needfree -= npages;
1624 page_create_putback(spgcnt_t npages)
1635 lump = roundup(npages, pcf_fanout) / pcf_fanout;
1636 freemem += npages;
1638 for (p = pcf; (npages > 0) && (p < &pcf[pcf_fanout]); p++) {
1647 if (lump < npages) {
1649 npages -= lump;
1651 *which += (uint_t)npages;
1652 npages = 0;
1666 if (npages > 1) {
1679 ASSERT(npages == 0);
2130 pgcnt_t npages;
2144 npages = btop(bytes);
2158 if (freemem <= throttlefree + npages) {
2168 kcage_freemem < kcage_throttlefree + npages) {
2176 if (kcage_create_throttle(npages, flags) == KCT_FAILURE) {
2182 if (!pcf_decrement_bucket(npages) &&
2183 !pcf_decrement_multiple(NULL, npages, 1)) {
2202 page_create_putback(npages);
2214 page_create_putback(npages);
2233 while (npages--) {
2256 pgcnt_t npages;
2277 pages_req = npages = btopr(bytes);
2283 if (npages >= max_page_get) {
2286 "page_create_toobig:vp %p off %llx npages "
2288 vp, off, npages, max_page_get);
2307 if (freemem <= throttlefree + npages)
2308 if (!page_create_throttle(npages, flags))
2316 kcage_freemem < kcage_throttlefree + npages) {
2324 if (kcage_create_throttle(npages, flags) == KCT_FAILURE)
2330 if (!pcf_decrement_bucket(npages)) {
2332 * Have to look harder. If npages is greater than
2339 if (!page_create_wait(npages, flags)) {
2369 while (npages--) {
3672 * Break page list cppp into two lists with npages in the first list.
3676 page_list_break(page_t **oppp, page_t **nppp, pgcnt_t npages)
3687 if (npages == 0) {
3692 for (n = 0, s2pp = *oppp; n < npages; n++) {
3905 * This routine reserves availrmem for npages;
3910 page_resv(pgcnt_t npages, uint_t flags)
3913 while (availrmem < tune.t_minarmem + npages) {
3919 page_needfree(npages);
3922 page_needfree(-(spgcnt_t)npages);
3925 availrmem -= npages;
3931 * This routine unreserves availrmem for npages;
3934 page_unresv(pgcnt_t npages)
3937 availrmem += npages;
5550 pgcnt_t npages)
5564 while (npages > 0) {
5582 if (npages < page_cnt)
5684 npages -= page_cnt;
5690 * Reclaim/reserve availrmem for npages.
5701 page_reclaim_mem(pgcnt_t npages, pgcnt_t epages, int adjust)
5710 while ((availrmem < tune.t_minarmem + npages + epages) &&
5713 deficit = tune.t_minarmem + npages + epages - availrmem;
5722 if (adjust && (availrmem >= tune.t_minarmem + npages + epages)) {
5723 availrmem -= npages;
7377 pcf_decrement_bucket(pgcnt_t npages)
7386 if (p->pcf_count > npages) {
7391 if (p->pcf_count > npages) {
7392 p->pcf_count -= (uint_t)npages;
7398 freemem -= npages;
7418 * npages: Is the number of pages we have been requested to
7432 pcf_decrement_multiple(pgcnt_t *pcftotal_ret, pgcnt_t npages, int unlock)
7443 if (pcftotal >= npages) {
7453 freemem -= npages;
7455 if (p->pcf_count <= npages) {
7456 npages -= p->pcf_count;
7459 p->pcf_count -= (uint_t)npages;
7460 npages = 0;
7465 ASSERT(npages == 0);