aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorChunguang Xu <brookxu@tencent.com>2021-04-13 09:39:05 +0800
committerTejun Heo <tj@kernel.org>2021-04-16 16:49:37 -0400
commitffeee417d97f9171bce9f43c22c9f477e4c84f54 (patch)
treea8f31eabe83346ec7a0d3f6df999dc1fed350d7c /kernel/cgroup
parentcgroup/cpuset: fix typos in comments (diff)
downloadlinux-dev-ffeee417d97f9171bce9f43c22c9f477e4c84f54.tar.xz
linux-dev-ffeee417d97f9171bce9f43c22c9f477e4c84f54.zip
cgroup: use tsk->in_iowait instead of delayacct_is_task_waiting_on_io()
If delayacct is disabled, then delayacct_is_task_waiting_on_io() always returns false, which causes the statistical value to be wrong. Perhaps tsk->in_iowait is better. Signed-off-by: Chunguang Xu <brookxu@tencent.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r--kernel/cgroup/cgroup-v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index a5751784ad74..391aa570369b 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -727,7 +727,7 @@ int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry)
stats->nr_stopped++;
break;
default:
- if (delayacct_is_task_waiting_on_io(tsk))
+ if (tsk->in_iowait)
stats->nr_io_wait++;
break;
}