Lines Matching refs:pct
23 void posix_cputimers_group_init(struct posix_cputimers *pct, u64 cpu_limit) in posix_cputimers_group_init() argument
25 posix_cputimers_init(pct); in posix_cputimers_group_init()
27 pct->bases[CPUCLOCK_PROF].nextevt = cpu_limit * NSEC_PER_SEC; in posix_cputimers_group_init()
28 pct->timers_active = true; in posix_cputimers_group_init()
145 static inline bool expiry_cache_is_inactive(const struct posix_cputimers *pct) in expiry_cache_is_inactive() argument
147 return !(~pct->bases[CPUCLOCK_PROF].nextevt | in expiry_cache_is_inactive()
148 ~pct->bases[CPUCLOCK_VIRT].nextevt | in expiry_cache_is_inactive()
149 ~pct->bases[CPUCLOCK_SCHED].nextevt); in expiry_cache_is_inactive()
270 struct posix_cputimers *pct = &tsk->signal->posix_cputimers; in thread_group_sample_cputime() local
272 WARN_ON_ONCE(!pct->timers_active); in thread_group_sample_cputime()
292 struct posix_cputimers *pct = &tsk->signal->posix_cputimers; in thread_group_start_cputime() local
297 if (!READ_ONCE(pct->timers_active)) { in thread_group_start_cputime()
315 WRITE_ONCE(pct->timers_active, true); in thread_group_start_cputime()
337 struct posix_cputimers *pct = &p->signal->posix_cputimers; in cpu_clock_sample_group() local
340 if (!READ_ONCE(pct->timers_active)) { in cpu_clock_sample_group()
525 static void cleanup_timers(struct posix_cputimers *pct) in cleanup_timers() argument
527 cleanup_timerqueue(&pct->bases[CPUCLOCK_PROF].tqhead); in cleanup_timers()
528 cleanup_timerqueue(&pct->bases[CPUCLOCK_VIRT].tqhead); in cleanup_timers()
529 cleanup_timerqueue(&pct->bases[CPUCLOCK_SCHED].tqhead); in cleanup_timers()
850 static void collect_posix_cputimers(struct posix_cputimers *pct, u64 *samples, in collect_posix_cputimers() argument
853 struct posix_cputimer_base *base = pct->bases; in collect_posix_cputimers()
892 struct posix_cputimers *pct = &tsk->posix_cputimers; in check_thread_timers() local
899 if (expiry_cache_is_inactive(pct)) in check_thread_timers()
903 collect_posix_cputimers(pct, samples, firing); in check_thread_timers()
926 if (expiry_cache_is_inactive(pct)) in check_thread_timers()
932 struct posix_cputimers *pct = &sig->posix_cputimers; in stop_process_timers() local
935 WRITE_ONCE(pct->timers_active, false); in stop_process_timers()
970 struct posix_cputimers *pct = &sig->posix_cputimers; in check_process_timers() local
979 if (!READ_ONCE(pct->timers_active) || pct->expiry_active) in check_process_timers()
986 pct->expiry_active = true; in check_process_timers()
993 collect_posix_cputimers(pct, samples, firing); in check_process_timers()
999 &pct->bases[CPUCLOCK_PROF].nextevt, in check_process_timers()
1002 &pct->bases[CPUCLOCK_VIRT].nextevt, in check_process_timers()
1025 if (softns < pct->bases[CPUCLOCK_PROF].nextevt) in check_process_timers()
1026 pct->bases[CPUCLOCK_PROF].nextevt = softns; in check_process_timers()
1029 if (expiry_cache_is_inactive(pct)) in check_process_timers()
1032 pct->expiry_active = false; in check_process_timers()
1086 task_cputimers_expired(const u64 *samples, struct posix_cputimers *pct) in task_cputimers_expired() argument
1091 if (samples[i] >= pct->bases[i].nextevt) in task_cputimers_expired()
1109 struct posix_cputimers *pct = &tsk->posix_cputimers; in fastpath_timer_check() local
1112 if (!expiry_cache_is_inactive(pct)) { in fastpath_timer_check()
1116 if (task_cputimers_expired(samples, pct)) in fastpath_timer_check()
1121 pct = &sig->posix_cputimers; in fastpath_timer_check()
1137 if (READ_ONCE(pct->timers_active) && !READ_ONCE(pct->expiry_active)) { in fastpath_timer_check()
1143 if (task_cputimers_expired(samples, pct)) in fastpath_timer_check()