aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/delayacct.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/delayacct.h')
-rw-r--r--include/linux/delayacct.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index ab94bc083558..f352f06fa063 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -39,6 +39,8 @@ extern void __delayacct_blkio_start(void);
39extern void __delayacct_blkio_end(void); 39extern void __delayacct_blkio_end(void);
40extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); 40extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *);
41extern __u64 __delayacct_blkio_ticks(struct task_struct *); 41extern __u64 __delayacct_blkio_ticks(struct task_struct *);
42extern void __delayacct_freepages_start(void);
43extern void __delayacct_freepages_end(void);
42 44
43static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) 45static inline int delayacct_is_task_waiting_on_io(struct task_struct *p)
44{ 46{
@@ -107,6 +109,18 @@ static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk)
107 return 0; 109 return 0;
108} 110}
109 111
112static inline void delayacct_freepages_start(void)
113{
114 if (current->delays)
115 __delayacct_freepages_start();
116}
117
118static inline void delayacct_freepages_end(void)
119{
120 if (current->delays)
121 __delayacct_freepages_end();
122}
123
110#else 124#else
111static inline void delayacct_set_flag(int flag) 125static inline void delayacct_set_flag(int flag)
112{} 126{}
@@ -129,6 +143,11 @@ static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk)
129{ return 0; } 143{ return 0; }
130static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) 144static inline int delayacct_is_task_waiting_on_io(struct task_struct *p)
131{ return 0; } 145{ return 0; }
146static inline void delayacct_freepages_start(void)
147{}
148static inline void delayacct_freepages_end(void)
149{}
150
132#endif /* CONFIG_TASK_DELAY_ACCT */ 151#endif /* CONFIG_TASK_DELAY_ACCT */
133 152
134#endif 153#endif