diff options
Diffstat (limited to 'kernel/taskstats.c')
-rw-r--r-- | kernel/taskstats.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index 906cae771585..059431ed67db 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -196,6 +196,8 @@ static int fill_pid(pid_t pid, struct task_struct *tsk, | |||
196 | 196 | ||
197 | /* fill in basic acct fields */ | 197 | /* fill in basic acct fields */ |
198 | stats->version = TASKSTATS_VERSION; | 198 | stats->version = TASKSTATS_VERSION; |
199 | stats->nvcsw = tsk->nvcsw; | ||
200 | stats->nivcsw = tsk->nivcsw; | ||
199 | bacct_add_tsk(stats, tsk); | 201 | bacct_add_tsk(stats, tsk); |
200 | 202 | ||
201 | /* fill in extended acct fields */ | 203 | /* fill in extended acct fields */ |
@@ -242,6 +244,8 @@ static int fill_tgid(pid_t tgid, struct task_struct *first, | |||
242 | */ | 244 | */ |
243 | delayacct_add_tsk(stats, tsk); | 245 | delayacct_add_tsk(stats, tsk); |
244 | 246 | ||
247 | stats->nvcsw += tsk->nvcsw; | ||
248 | stats->nivcsw += tsk->nivcsw; | ||
245 | } while_each_thread(first, tsk); | 249 | } while_each_thread(first, tsk); |
246 | 250 | ||
247 | unlock_task_sighand(first, &flags); | 251 | unlock_task_sighand(first, &flags); |