Lines Matching full:amount

96 		uint64_t amount);
98 uint64_t amount);
498 * Increase consumption of 'resource' by 'amount' for 'racct',
499 * but not its parents. Differently from other cases, 'amount' here
504 int64_t amount)
511 racct->r_resources[resource] += amount;
533 racct_add_locked(struct proc *p, int resource, uint64_t amount, int force)
547 error = rctl_enforce(p, resource, amount);
549 SDT_PROBE3(racct, , rusage, add__failure, p, resource, amount);
553 racct_adjust_resource(p->p_racct, resource, amount);
554 racct_add_cred_locked(p->p_ucred, resource, amount);
560 * Increase allocation of 'resource' by 'amount' for process 'p'.
564 racct_add(struct proc *p, int resource, uint64_t amount)
571 SDT_PROBE3(racct, , rusage, add, p, resource, amount);
574 error = racct_add_locked(p, resource, amount, 0);
580 * Increase allocation of 'resource' by 'amount' for process 'p'.
584 racct_add_force(struct proc *p, int resource, uint64_t amount)
590 SDT_PROBE3(racct, , rusage, add__force, p, resource, amount);
593 racct_add_locked(p, resource, amount, 1);
598 racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount)
604 racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, amount);
607 amount);
608 racct_adjust_resource(cred->cr_loginclass->lc_racct, resource, amount);
612 * Increase allocation of 'resource' by 'amount' for credential 'cred'.
616 racct_add_cred(struct ucred *cred, int resource, uint64_t amount)
622 SDT_PROBE3(racct, , rusage, add__cred, cred, resource, amount);
625 racct_add_cred_locked(cred, resource, amount);
654 racct_set_locked(struct proc *p, int resource, uint64_t amount, int force)
672 diff_proc = amount - old_amount;
677 * between the new amount and the proportional value of the
678 * old amount that has decayed in the ucred racct containers.
681 diff_cred = amount - decayed_amount;
694 amount);
709 * Set allocation of 'resource' to 'amount' for process 'p'.
716 racct_set_unlocked(struct proc *p, int resource, uint64_t amount)
722 error = racct_set(p, resource, amount);
728 racct_set(struct proc *p, int resource, uint64_t amount)
735 SDT_PROBE3(racct, , rusage, set__force, p, resource, amount);
738 error = racct_set_locked(p, resource, amount, 0);
744 racct_set_force(struct proc *p, int resource, uint64_t amount)
750 SDT_PROBE3(racct, , rusage, set, p, resource, amount);
753 racct_set_locked(p, resource, amount, 1);
758 * Returns amount of 'resource' the process 'p' can keep allocated.
760 * is marked undeniable. Amount of already allocated resource does
784 * Returns amount of 'resource' the process 'p' can keep allocated.
786 * is marked undeniable. Amount of already allocated resource does
810 * Returns amount of the %cpu resource that process 'p' can add to its %cpu
834 * Decrease allocation of 'resource' by 'amount' for process 'p'.
837 racct_sub(struct proc *p, int resource, uint64_t amount)
843 SDT_PROBE3(racct, , rusage, sub, p, resource, amount);
853 KASSERT(amount <= p->p_racct->r_resources[resource],
855 "than allocated %jd for %s (pid %d)", __func__, amount, resource,
858 racct_adjust_resource(p->p_racct, resource, -amount);
859 racct_sub_cred_locked(p->p_ucred, resource, amount);
864 racct_sub_cred_locked(struct ucred *cred, int resource, uint64_t amount)
870 racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, -amount);
873 -amount);
874 racct_adjust_resource(cred->cr_loginclass->lc_racct, resource, -amount);
878 * Decrease allocation of 'resource' by 'amount' for credential 'cred'.
881 racct_sub_cred(struct ucred *cred, int resource, uint64_t amount)
887 SDT_PROBE3(racct, , rusage, sub__cred, cred, resource, amount);
896 racct_sub_cred_locked(cred, resource, amount);