Lines Matching refs:pct

24 void posix_cputimers_group_init(struct posix_cputimers *pct, u64 cpu_limit)
26 posix_cputimers_init(pct);
28 pct->bases[CPUCLOCK_PROF].nextevt = cpu_limit * NSEC_PER_SEC;
29 pct->timers_active = true;
152 static inline bool expiry_cache_is_inactive(const struct posix_cputimers *pct)
154 return !(~pct->bases[CPUCLOCK_PROF].nextevt |
155 ~pct->bases[CPUCLOCK_VIRT].nextevt |
156 ~pct->bases[CPUCLOCK_SCHED].nextevt);
276 struct posix_cputimers *pct = &tsk->signal->posix_cputimers;
278 WARN_ON_ONCE(!pct->timers_active);
298 struct posix_cputimers *pct = &tsk->signal->posix_cputimers;
303 if (!READ_ONCE(pct->timers_active)) {
321 WRITE_ONCE(pct->timers_active, true);
343 struct posix_cputimers *pct = &p->signal->posix_cputimers;
346 if (!READ_ONCE(pct->timers_active)) {
531 static void cleanup_timers(struct posix_cputimers *pct)
533 cleanup_timerqueue(&pct->bases[CPUCLOCK_PROF].tqhead);
534 cleanup_timerqueue(&pct->bases[CPUCLOCK_VIRT].tqhead);
535 cleanup_timerqueue(&pct->bases[CPUCLOCK_SCHED].tqhead);
858 static void collect_posix_cputimers(struct posix_cputimers *pct, u64 *samples,
861 struct posix_cputimer_base *base = pct->bases;
900 struct posix_cputimers *pct = &tsk->posix_cputimers;
907 if (expiry_cache_is_inactive(pct))
911 collect_posix_cputimers(pct, samples, firing);
934 if (expiry_cache_is_inactive(pct))
940 struct posix_cputimers *pct = &sig->posix_cputimers;
943 WRITE_ONCE(pct->timers_active, false);
978 struct posix_cputimers *pct = &sig->posix_cputimers;
987 if (!READ_ONCE(pct->timers_active) || pct->expiry_active)
994 pct->expiry_active = true;
1001 collect_posix_cputimers(pct, samples, firing);
1007 &pct->bases[CPUCLOCK_PROF].nextevt,
1010 &pct->bases[CPUCLOCK_VIRT].nextevt,
1033 if (softns < pct->bases[CPUCLOCK_PROF].nextevt)
1034 pct->bases[CPUCLOCK_PROF].nextevt = softns;
1037 if (expiry_cache_is_inactive(pct))
1040 pct->expiry_active = false;
1088 * @pct: Pointer to a posix_cputimers container
1091 * member of @pct->bases[CLK].nextevt. False otherwise
1094 task_cputimers_expired(const u64 *samples, struct posix_cputimers *pct)
1099 if (samples[i] >= pct->bases[i].nextevt)
1117 struct posix_cputimers *pct = &tsk->posix_cputimers;
1120 if (!expiry_cache_is_inactive(pct)) {
1124 if (task_cputimers_expired(samples, pct))
1129 pct = &sig->posix_cputimers;
1145 if (READ_ONCE(pct->timers_active) && !READ_ONCE(pct->expiry_active)) {
1151 if (task_cputimers_expired(samples, pct))