Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 3 of 3) sorted by relevance

/kernel/
Dres_counter.c17 void res_counter_init(struct res_counter *counter, struct res_counter *parent) in res_counter_init() argument
19 spin_lock_init(&counter->lock); in res_counter_init()
20 counter->limit = RES_COUNTER_MAX; in res_counter_init()
21 counter->soft_limit = RES_COUNTER_MAX; in res_counter_init()
22 counter->parent = parent; in res_counter_init()
25 static u64 res_counter_uncharge_locked(struct res_counter *counter, in res_counter_uncharge_locked() argument
28 if (WARN_ON(counter->usage < val)) in res_counter_uncharge_locked()
29 val = counter->usage; in res_counter_uncharge_locked()
31 counter->usage -= val; in res_counter_uncharge_locked()
32 return counter->usage; in res_counter_uncharge_locked()
[all …]
/kernel/sched/
Dcputime.c593 static void cputime_advance(cputime_t *counter, cputime_t new) in cputime_advance() argument
597 while (new > (old = READ_ONCE(*counter))) in cputime_advance()
598 cmpxchg_cputime(counter, old, new); in cputime_advance()
/kernel/trace/
Dftrace.c463 unsigned long counter; member
517 if (!rec->counter) in function_stat_next()
556 if (a->counter < b->counter) in function_stat_cmp()
558 if (a->counter > b->counter) in function_stat_cmp()
592 if (unlikely(rec->counter == 0)) { in function_stat_show()
598 seq_printf(m, " %-30.30s %10lu", str, rec->counter); in function_stat_show()
603 do_div(avg, rec->counter); in function_stat_show()
606 if (rec->counter <= 1) in function_stat_show()
613 stddev = rec->counter * rec->time_squared - in function_stat_show()
620 do_div(stddev, rec->counter * (rec->counter - 1) * 1000); in function_stat_show()
[all …]