Lines Matching refs:acct

170 static unsigned long vtime_delta_scaled(struct cpu_accounting_data *acct,  in vtime_delta_scaled()  argument
179 deltascaled = nowscaled - acct->startspurr; in vtime_delta_scaled()
180 acct->startspurr = nowscaled; in vtime_delta_scaled()
181 utime = acct->utime - acct->utime_sspurr; in vtime_delta_scaled()
182 acct->utime_sspurr = acct->utime; in vtime_delta_scaled()
204 acct->utime_scaled += utime_scaled; in vtime_delta_scaled()
210 static unsigned long vtime_delta(struct cpu_accounting_data *acct, in vtime_delta() argument
219 stime = now - acct->starttime; in vtime_delta()
220 acct->starttime = now; in vtime_delta()
222 *stime_scaled = vtime_delta_scaled(acct, now, stime); in vtime_delta()
233 static void vtime_delta_kernel(struct cpu_accounting_data *acct, in vtime_delta_kernel() argument
238 *stime = vtime_delta(acct, stime_scaled, &steal_time); in vtime_delta_kernel()
240 acct->steal_time += steal_time; in vtime_delta_kernel()
245 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_kernel() local
248 vtime_delta_kernel(acct, &stime, &stime_scaled); in vtime_account_kernel()
251 acct->gtime += stime; in vtime_account_kernel()
253 acct->utime_scaled += stime_scaled; in vtime_account_kernel()
256 acct->stime += stime; in vtime_account_kernel()
258 acct->stime_scaled += stime_scaled; in vtime_account_kernel()
267 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_idle() local
269 stime = vtime_delta(acct, &stime_scaled, &steal_time); in vtime_account_idle()
270 acct->idle_time += stime + steal_time; in vtime_account_idle()
273 static void vtime_account_irq_field(struct cpu_accounting_data *acct, in vtime_account_irq_field() argument
278 vtime_delta_kernel(acct, &stime, &stime_scaled); in vtime_account_irq_field()
281 acct->stime_scaled += stime_scaled; in vtime_account_irq_field()
287 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_softirq() local
288 vtime_account_irq_field(acct, &acct->softirq_time); in vtime_account_softirq()
293 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_account_hardirq() local
294 vtime_account_irq_field(acct, &acct->hardirq_time); in vtime_account_hardirq()
298 struct cpu_accounting_data *acct) in vtime_flush_scaled() argument
301 if (acct->utime_scaled) in vtime_flush_scaled()
302 tsk->utimescaled += cputime_to_nsecs(acct->utime_scaled); in vtime_flush_scaled()
303 if (acct->stime_scaled) in vtime_flush_scaled()
304 tsk->stimescaled += cputime_to_nsecs(acct->stime_scaled); in vtime_flush_scaled()
306 acct->utime_scaled = 0; in vtime_flush_scaled()
307 acct->utime_sspurr = 0; in vtime_flush_scaled()
308 acct->stime_scaled = 0; in vtime_flush_scaled()
321 struct cpu_accounting_data *acct = get_accounting(tsk); in vtime_flush() local
323 if (acct->utime) in vtime_flush()
324 account_user_time(tsk, cputime_to_nsecs(acct->utime)); in vtime_flush()
326 if (acct->gtime) in vtime_flush()
327 account_guest_time(tsk, cputime_to_nsecs(acct->gtime)); in vtime_flush()
329 if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) { in vtime_flush()
330 account_steal_time(cputime_to_nsecs(acct->steal_time)); in vtime_flush()
331 acct->steal_time = 0; in vtime_flush()
334 if (acct->idle_time) in vtime_flush()
335 account_idle_time(cputime_to_nsecs(acct->idle_time)); in vtime_flush()
337 if (acct->stime) in vtime_flush()
338 account_system_index_time(tsk, cputime_to_nsecs(acct->stime), in vtime_flush()
341 if (acct->hardirq_time) in vtime_flush()
342 account_system_index_time(tsk, cputime_to_nsecs(acct->hardirq_time), in vtime_flush()
344 if (acct->softirq_time) in vtime_flush()
345 account_system_index_time(tsk, cputime_to_nsecs(acct->softirq_time), in vtime_flush()
348 vtime_flush_scaled(tsk, acct); in vtime_flush()
350 acct->utime = 0; in vtime_flush()
351 acct->gtime = 0; in vtime_flush()
352 acct->idle_time = 0; in vtime_flush()
353 acct->stime = 0; in vtime_flush()
354 acct->hardirq_time = 0; in vtime_flush()
355 acct->softirq_time = 0; in vtime_flush()