Lines Matching refs:acct
185 static unsigned long vtime_delta_scaled(struct cpu_accounting_data *acct, in vtime_delta_scaled() argument
194 deltascaled = nowscaled - acct->startspurr; in vtime_delta_scaled()
195 acct->startspurr = nowscaled; in vtime_delta_scaled()
196 utime = acct->utime - acct->utime_sspurr; in vtime_delta_scaled()
197 acct->utime_sspurr = acct->utime; in vtime_delta_scaled()
219 acct->utime_scaled += utime_scaled; in vtime_delta_scaled()
225 static unsigned long vtime_delta(struct cpu_accounting_data *acct, in vtime_delta() argument
234 stime = now - acct->starttime; in vtime_delta()
235 acct->starttime = now; in vtime_delta()
237 *stime_scaled = vtime_delta_scaled(acct, now, stime); in vtime_delta()
248 static void vtime_delta_kernel(struct cpu_accounting_data *acct, in vtime_delta_kernel() argument
253 *stime = vtime_delta(acct, stime_scaled, &steal_time); in vtime_delta_kernel()
255 acct->steal_time += steal_time; in vtime_delta_kernel()
260 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_kernel() local
263 vtime_delta_kernel(acct, &stime, &stime_scaled); in vtime_account_kernel()
266 acct->gtime += stime; in vtime_account_kernel()
268 acct->utime_scaled += stime_scaled; in vtime_account_kernel()
271 acct->stime += stime; in vtime_account_kernel()
273 acct->stime_scaled += stime_scaled; in vtime_account_kernel()
282 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_idle() local
284 stime = vtime_delta(acct, &stime_scaled, &steal_time); in vtime_account_idle()
285 acct->idle_time += stime + steal_time; in vtime_account_idle()
288 static void vtime_account_irq_field(struct cpu_accounting_data *acct, in vtime_account_irq_field() argument
293 vtime_delta_kernel(acct, &stime, &stime_scaled); in vtime_account_irq_field()
296 acct->stime_scaled += stime_scaled; in vtime_account_irq_field()
302 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_softirq() local
303 vtime_account_irq_field(acct, &acct->softirq_time); in vtime_account_softirq()
308 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_hardirq() local
309 vtime_account_irq_field(acct, &acct->hardirq_time); in vtime_account_hardirq()
313 struct cpu_accounting_data *acct) in vtime_flush_scaled() argument
316 if (acct->utime_scaled) in vtime_flush_scaled()
317 tsk->utimescaled += cputime_to_nsecs(acct->utime_scaled); in vtime_flush_scaled()
318 if (acct->stime_scaled) in vtime_flush_scaled()
319 tsk->stimescaled += cputime_to_nsecs(acct->stime_scaled); in vtime_flush_scaled()
321 acct->utime_scaled = 0; in vtime_flush_scaled()
322 acct->utime_sspurr = 0; in vtime_flush_scaled()
323 acct->stime_scaled = 0; in vtime_flush_scaled()
336 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_flush() local
338 if (acct->utime) in vtime_flush()
339 account_user_time(tsk, cputime_to_nsecs(acct->utime)); in vtime_flush()
341 if (acct->gtime) in vtime_flush()
342 account_guest_time(tsk, cputime_to_nsecs(acct->gtime)); in vtime_flush()
344 if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) { in vtime_flush()
345 account_steal_time(cputime_to_nsecs(acct->steal_time)); in vtime_flush()
346 acct->steal_time = 0; in vtime_flush()
349 if (acct->idle_time) in vtime_flush()
350 account_idle_time(cputime_to_nsecs(acct->idle_time)); in vtime_flush()
352 if (acct->stime) in vtime_flush()
353 account_system_index_time(tsk, cputime_to_nsecs(acct->stime), in vtime_flush()
356 if (acct->hardirq_time) in vtime_flush()
357 account_system_index_time(tsk, cputime_to_nsecs(acct->hardirq_time), in vtime_flush()
359 if (acct->softirq_time) in vtime_flush()
360 account_system_index_time(tsk, cputime_to_nsecs(acct->softirq_time), in vtime_flush()
363 vtime_flush_scaled(tsk, acct); in vtime_flush()
365 acct->utime = 0; in vtime_flush()
366 acct->gtime = 0; in vtime_flush()
367 acct->idle_time = 0; in vtime_flush()
368 acct->stime = 0; in vtime_flush()
369 acct->hardirq_time = 0; in vtime_flush()
370 acct->softirq_time = 0; in vtime_flush()