Lines Matching refs:acct
233 struct cpu_accounting_data *acct = &local_paca->accounting; in accumulate_stolen_time() local
235 sst = scan_dispatch_log(acct->starttime_user); in accumulate_stolen_time()
236 ust = scan_dispatch_log(acct->starttime); in accumulate_stolen_time()
237 acct->stime -= sst; in accumulate_stolen_time()
238 acct->utime -= ust; in accumulate_stolen_time()
239 acct->steal_time += ust + sst; in accumulate_stolen_time()
265 static unsigned long vtime_delta_scaled(struct cpu_accounting_data *acct, in vtime_delta_scaled() argument
274 deltascaled = nowscaled - acct->startspurr; in vtime_delta_scaled()
275 acct->startspurr = nowscaled; in vtime_delta_scaled()
276 utime = acct->utime - acct->utime_sspurr; in vtime_delta_scaled()
277 acct->utime_sspurr = acct->utime; in vtime_delta_scaled()
299 acct->utime_scaled += utime_scaled; in vtime_delta_scaled()
305 static unsigned long vtime_delta(struct cpu_accounting_data *acct, in vtime_delta() argument
314 stime = now - acct->starttime; in vtime_delta()
315 acct->starttime = now; in vtime_delta()
317 *stime_scaled = vtime_delta_scaled(acct, now, stime); in vtime_delta()
324 static void vtime_delta_kernel(struct cpu_accounting_data *acct, in vtime_delta_kernel() argument
329 *stime = vtime_delta(acct, stime_scaled, &steal_time); in vtime_delta_kernel()
331 acct->steal_time += steal_time; in vtime_delta_kernel()
336 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_kernel() local
339 vtime_delta_kernel(acct, &stime, &stime_scaled); in vtime_account_kernel()
342 acct->gtime += stime; in vtime_account_kernel()
344 acct->utime_scaled += stime_scaled; in vtime_account_kernel()
347 acct->stime += stime; in vtime_account_kernel()
349 acct->stime_scaled += stime_scaled; in vtime_account_kernel()
358 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_idle() local
360 stime = vtime_delta(acct, &stime_scaled, &steal_time); in vtime_account_idle()
361 acct->idle_time += stime + steal_time; in vtime_account_idle()
364 static void vtime_account_irq_field(struct cpu_accounting_data *acct, in vtime_account_irq_field() argument
369 vtime_delta_kernel(acct, &stime, &stime_scaled); in vtime_account_irq_field()
372 acct->stime_scaled += stime_scaled; in vtime_account_irq_field()
378 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_softirq() local
379 vtime_account_irq_field(acct, &acct->softirq_time); in vtime_account_softirq()
384 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_hardirq() local
385 vtime_account_irq_field(acct, &acct->hardirq_time); in vtime_account_hardirq()
389 struct cpu_accounting_data *acct) in vtime_flush_scaled() argument
392 if (acct->utime_scaled) in vtime_flush_scaled()
393 tsk->utimescaled += cputime_to_nsecs(acct->utime_scaled); in vtime_flush_scaled()
394 if (acct->stime_scaled) in vtime_flush_scaled()
395 tsk->stimescaled += cputime_to_nsecs(acct->stime_scaled); in vtime_flush_scaled()
397 acct->utime_scaled = 0; in vtime_flush_scaled()
398 acct->utime_sspurr = 0; in vtime_flush_scaled()
399 acct->stime_scaled = 0; in vtime_flush_scaled()
412 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_flush() local
414 if (acct->utime) in vtime_flush()
415 account_user_time(tsk, cputime_to_nsecs(acct->utime)); in vtime_flush()
417 if (acct->gtime) in vtime_flush()
418 account_guest_time(tsk, cputime_to_nsecs(acct->gtime)); in vtime_flush()
420 if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) { in vtime_flush()
421 account_steal_time(cputime_to_nsecs(acct->steal_time)); in vtime_flush()
422 acct->steal_time = 0; in vtime_flush()
425 if (acct->idle_time) in vtime_flush()
426 account_idle_time(cputime_to_nsecs(acct->idle_time)); in vtime_flush()
428 if (acct->stime) in vtime_flush()
429 account_system_index_time(tsk, cputime_to_nsecs(acct->stime), in vtime_flush()
432 if (acct->hardirq_time) in vtime_flush()
433 account_system_index_time(tsk, cputime_to_nsecs(acct->hardirq_time), in vtime_flush()
435 if (acct->softirq_time) in vtime_flush()
436 account_system_index_time(tsk, cputime_to_nsecs(acct->softirq_time), in vtime_flush()
439 vtime_flush_scaled(tsk, acct); in vtime_flush()
441 acct->utime = 0; in vtime_flush()
442 acct->gtime = 0; in vtime_flush()
443 acct->idle_time = 0; in vtime_flush()
444 acct->stime = 0; in vtime_flush()
445 acct->hardirq_time = 0; in vtime_flush()
446 acct->softirq_time = 0; in vtime_flush()