Lines Matching defs:amount

103 		uint64_t amount);
105 uint64_t amount);
511 * Increase consumption of 'resource' by 'amount' for 'racct',
512 * but not its parents. Differently from other cases, 'amount' here
517 int64_t amount)
524 racct->r_resources[resource] += amount;
546 racct_add_locked(struct proc *p, int resource, uint64_t amount, int force)
560 error = rctl_enforce(p, resource, amount);
562 SDT_PROBE3(racct, , rusage, add__failure, p, resource, amount);
566 racct_adjust_resource(p->p_racct, resource, amount);
567 racct_add_cred_locked(p->p_ucred, resource, amount);
573 * Increase allocation of 'resource' by 'amount' for process 'p'.
577 racct_add(struct proc *p, int resource, uint64_t amount)
584 SDT_PROBE3(racct, , rusage, add, p, resource, amount);
587 error = racct_add_locked(p, resource, amount, 0);
593 * Increase allocation of 'resource' by 'amount' for process 'p'.
597 racct_add_force(struct proc *p, int resource, uint64_t amount)
603 SDT_PROBE3(racct, , rusage, add__force, p, resource, amount);
606 racct_add_locked(p, resource, amount, 1);
611 racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount)
617 racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, amount);
620 amount);
621 racct_adjust_resource(cred->cr_loginclass->lc_racct, resource, amount);
625 * Increase allocation of 'resource' by 'amount' for credential 'cred'.
629 racct_add_cred(struct ucred *cred, int resource, uint64_t amount)
635 SDT_PROBE3(racct, , rusage, add__cred, cred, resource, amount);
638 racct_add_cred_locked(cred, resource, amount);
667 racct_set_locked(struct proc *p, int resource, uint64_t amount, int force)
685 diff_proc = amount - old_amount;
690 * between the new amount and the proportional value of the
691 * old amount that has decayed in the ucred racct containers.
694 diff_cred = amount - decayed_amount;
707 amount);
722 * Set allocation of 'resource' to 'amount' for process 'p'.
729 racct_set_unlocked(struct proc *p, int resource, uint64_t amount)
735 error = racct_set(p, resource, amount);
741 racct_set(struct proc *p, int resource, uint64_t amount)
748 SDT_PROBE3(racct, , rusage, set__force, p, resource, amount);
751 error = racct_set_locked(p, resource, amount, 0);
757 racct_set_force(struct proc *p, int resource, uint64_t amount)
763 SDT_PROBE3(racct, , rusage, set, p, resource, amount);
766 racct_set_locked(p, resource, amount, 1);
771 * Returns amount of 'resource' the process 'p' can keep allocated.
797 * Returns amount of 'resource' the process 'p' can keep allocated.
823 * Returns amount of the %cpu resource that process 'p' can add to its %cpu
847 * Decrease allocation of 'resource' by 'amount' for process 'p'.
850 racct_sub(struct proc *p, int resource, uint64_t amount)
856 SDT_PROBE3(racct, , rusage, sub, p, resource, amount);
866 KASSERT(amount <= p->p_racct->r_resources[resource],
868 "than allocated %jd for %s (pid %d)", __func__, amount, resource,
871 racct_adjust_resource(p->p_racct, resource, -amount);
872 racct_sub_cred_locked(p->p_ucred, resource, amount);
877 racct_sub_cred_locked(struct ucred *cred, int resource, uint64_t amount)
883 racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, -amount);
886 -amount);
887 racct_adjust_resource(cred->cr_loginclass->lc_racct, resource, -amount);
891 * Decrease allocation of 'resource' by 'amount' for credential 'cred'.
894 racct_sub_cred(struct ucred *cred, int resource, uint64_t amount)
900 SDT_PROBE3(racct, , rusage, sub__cred, cred, resource, amount);
909 racct_sub_cred_locked(cred, resource, amount);