mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 06:20:53 +07:00
6fac4829ce
This is in preparation for the full dynticks feature. While remotely reading the cputime of a task running in a full dynticks CPU, we'll need to do some extra-computation. This way we can account the time it spent tickless in userspace since its last cputime snapshot. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de>
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
/*
|
|
* tsacct_kern.h - kernel header for system accounting over taskstats interface
|
|
*
|
|
* Copyright (C) Jay Lan SGI
|
|
*/
|
|
|
|
#ifndef _LINUX_TSACCT_KERN_H
|
|
#define _LINUX_TSACCT_KERN_H
|
|
|
|
#include <linux/taskstats.h>
|
|
|
|
#ifdef CONFIG_TASKSTATS
|
|
extern void bacct_add_tsk(struct user_namespace *user_ns,
|
|
struct pid_namespace *pid_ns,
|
|
struct taskstats *stats, struct task_struct *tsk);
|
|
#else
|
|
static inline void bacct_add_tsk(struct user_namespace *user_ns,
|
|
struct pid_namespace *pid_ns,
|
|
struct taskstats *stats, struct task_struct *tsk)
|
|
{}
|
|
#endif /* CONFIG_TASKSTATS */
|
|
|
|
#ifdef CONFIG_TASK_XACCT
|
|
extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
|
|
extern void acct_update_integrals(struct task_struct *tsk);
|
|
extern void acct_account_cputime(struct task_struct *tsk);
|
|
extern void acct_clear_integrals(struct task_struct *tsk);
|
|
#else
|
|
static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
|
|
{}
|
|
static inline void acct_update_integrals(struct task_struct *tsk)
|
|
{}
|
|
static inline void acct_account_cputime(struct task_struct *tsk)
|
|
{}
|
|
static inline void acct_clear_integrals(struct task_struct *tsk)
|
|
{}
|
|
#endif /* CONFIG_TASK_XACCT */
|
|
|
|
#endif
|
|
|
|
|