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
295 if (!READ_ONCE(pct->timers_active)) { in thread_group_start_cputime()
313 WRITE_ONCE(pct->timers_active, true); in thread_group_start_cputime()
335 struct posix_cputimers *pct = &p->signal->posix_cputimers; in cpu_clock_sample_group() local
338 if (!READ_ONCE(pct->timers_active)) { in cpu_clock_sample_group()
474 static void cleanup_timers(struct posix_cputimers *pct) in cleanup_timers() argument
476 cleanup_timerqueue(&pct->bases[CPUCLOCK_PROF].tqhead); in cleanup_timers()
477 cleanup_timerqueue(&pct->bases[CPUCLOCK_VIRT].tqhead); in cleanup_timers()
478 cleanup_timerqueue(&pct->bases[CPUCLOCK_SCHED].tqhead); in cleanup_timers()
794 static void collect_posix_cputimers(struct posix_cputimers *pct, u64 *samples, in collect_posix_cputimers() argument
797 struct posix_cputimer_base *base = pct->bases; in collect_posix_cputimers()
836 struct posix_cputimers *pct = &tsk->posix_cputimers; in check_thread_timers() local
843 if (expiry_cache_is_inactive(pct)) in check_thread_timers()
847 collect_posix_cputimers(pct, samples, firing); in check_thread_timers()
870 if (expiry_cache_is_inactive(pct)) in check_thread_timers()
876 struct posix_cputimers *pct = &sig->posix_cputimers; in stop_process_timers() local
879 WRITE_ONCE(pct->timers_active, false); in stop_process_timers()
914 struct posix_cputimers *pct = &sig->posix_cputimers; in check_process_timers() local
923 if (!READ_ONCE(pct->timers_active) || pct->expiry_active) in check_process_timers()
930 pct->expiry_active = true; in check_process_timers()
937 collect_posix_cputimers(pct, samples, firing); in check_process_timers()
943 &pct->bases[CPUCLOCK_PROF].nextevt, in check_process_timers()
946 &pct->bases[CPUCLOCK_VIRT].nextevt, in check_process_timers()
969 if (softns < pct->bases[CPUCLOCK_PROF].nextevt) in check_process_timers()
970 pct->bases[CPUCLOCK_PROF].nextevt = softns; in check_process_timers()
973 if (expiry_cache_is_inactive(pct)) in check_process_timers()
976 pct->expiry_active = false; in check_process_timers()
1030 task_cputimers_expired(const u64 *samples, struct posix_cputimers *pct) in task_cputimers_expired() argument
1035 if (samples[i] >= pct->bases[i].nextevt) in task_cputimers_expired()
1053 struct posix_cputimers *pct = &tsk->posix_cputimers; in fastpath_timer_check() local
1056 if (!expiry_cache_is_inactive(pct)) { in fastpath_timer_check()
1060 if (task_cputimers_expired(samples, pct)) in fastpath_timer_check()
1065 pct = &sig->posix_cputimers; in fastpath_timer_check()
1081 if (READ_ONCE(pct->timers_active) && !READ_ONCE(pct->expiry_active)) { in fastpath_timer_check()
1087 if (task_cputimers_expired(samples, pct)) in fastpath_timer_check()