diff options
Diffstat (limited to 'include/linux/delayacct.h')
-rw-r--r-- | include/linux/delayacct.h | 19 |
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); | |||
39 | extern void __delayacct_blkio_end(void); | 39 | extern void __delayacct_blkio_end(void); |
40 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); | 40 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); |
41 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); | 41 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); |
42 | extern void __delayacct_freepages_start(void); | ||
43 | extern void __delayacct_freepages_end(void); | ||
42 | 44 | ||
43 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) | 45 | static 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 | ||
112 | static inline void delayacct_freepages_start(void) | ||
113 | { | ||
114 | if (current->delays) | ||
115 | __delayacct_freepages_start(); | ||
116 | } | ||
117 | |||
118 | static inline void delayacct_freepages_end(void) | ||
119 | { | ||
120 | if (current->delays) | ||
121 | __delayacct_freepages_end(); | ||
122 | } | ||
123 | |||
110 | #else | 124 | #else |
111 | static inline void delayacct_set_flag(int flag) | 125 | static 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; } |
130 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) | 144 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) |
131 | { return 0; } | 145 | { return 0; } |
146 | static inline void delayacct_freepages_start(void) | ||
147 | {} | ||
148 | static 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 |