17 #ifndef _LINUX_DELAYACCT_H
18 #define _LINUX_DELAYACCT_H
20 #include <linux/sched.h>
21 #include <linux/slab.h>
28 #define DELAYACCT_PF_SWAPIN 0x00000001
29 #define DELAYACCT_PF_BLKIO 0x00000002
31 #ifdef CONFIG_TASK_DELAY_ACCT
33 extern int delayacct_on;
37 extern void __delayacct_tsk_exit(
struct task_struct *);
45 static inline int delayacct_is_task_waiting_on_io(
struct task_struct *
p)
53 static inline void delayacct_set_flag(
int flag)
59 static inline void delayacct_clear_flag(
int flag)
62 current->delays->flags &= ~flag;
65 static inline void delayacct_tsk_init(
struct task_struct *tsk)
76 static inline void delayacct_tsk_free(
struct task_struct *tsk)
83 static inline void delayacct_blkio_start(
void)
90 static inline void delayacct_blkio_end(
void)
97 static inline int delayacct_add_tsk(
struct taskstats *
d,
100 if (!delayacct_on || !tsk->delays)
112 static inline void delayacct_freepages_start(
void)
118 static inline void delayacct_freepages_end(
void)
125 static inline void delayacct_set_flag(
int flag)
127 static inline void delayacct_clear_flag(
int flag)
131 static inline void delayacct_tsk_init(
struct task_struct *tsk)
133 static inline void delayacct_tsk_free(
struct task_struct *tsk)
135 static inline void delayacct_blkio_start(
void)
137 static inline void delayacct_blkio_end(
void)
139 static inline int delayacct_add_tsk(
struct taskstats *d,
144 static inline int delayacct_is_task_waiting_on_io(
struct task_struct *p)
146 static inline void delayacct_freepages_start(
void)
148 static inline void delayacct_freepages_end(
void)