diff options
Diffstat (limited to 'kernel/delayacct.c')
-rw-r--r-- | kernel/delayacct.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/delayacct.c b/kernel/delayacct.c index 10e43fd8b721..b3179dad71be 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c | |||
@@ -145,8 +145,11 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) | |||
145 | d->blkio_delay_total = (tmp < d->blkio_delay_total) ? 0 : tmp; | 145 | d->blkio_delay_total = (tmp < d->blkio_delay_total) ? 0 : tmp; |
146 | tmp = d->swapin_delay_total + tsk->delays->swapin_delay; | 146 | tmp = d->swapin_delay_total + tsk->delays->swapin_delay; |
147 | d->swapin_delay_total = (tmp < d->swapin_delay_total) ? 0 : tmp; | 147 | d->swapin_delay_total = (tmp < d->swapin_delay_total) ? 0 : tmp; |
148 | tmp = d->freepages_delay_total + tsk->delays->freepages_delay; | ||
149 | d->freepages_delay_total = (tmp < d->freepages_delay_total) ? 0 : tmp; | ||
148 | d->blkio_count += tsk->delays->blkio_count; | 150 | d->blkio_count += tsk->delays->blkio_count; |
149 | d->swapin_count += tsk->delays->swapin_count; | 151 | d->swapin_count += tsk->delays->swapin_count; |
152 | d->freepages_count += tsk->delays->freepages_count; | ||
150 | spin_unlock_irqrestore(&tsk->delays->lock, flags); | 153 | spin_unlock_irqrestore(&tsk->delays->lock, flags); |
151 | 154 | ||
152 | done: | 155 | done: |
@@ -165,3 +168,16 @@ __u64 __delayacct_blkio_ticks(struct task_struct *tsk) | |||
165 | return ret; | 168 | return ret; |
166 | } | 169 | } |
167 | 170 | ||
171 | void __delayacct_freepages_start(void) | ||
172 | { | ||
173 | delayacct_start(¤t->delays->freepages_start); | ||
174 | } | ||
175 | |||
176 | void __delayacct_freepages_end(void) | ||
177 | { | ||
178 | delayacct_end(¤t->delays->freepages_start, | ||
179 | ¤t->delays->freepages_end, | ||
180 | ¤t->delays->freepages_delay, | ||
181 | ¤t->delays->freepages_count); | ||
182 | } | ||
183 | |||