[RHEL8,COMMIT] sched: Fix task_group "iowait_sum" statistic accounting

Submitted by Konstantin Khorenko on Nov. 3, 2020, 1:09 p.m.

Details

Message ID 202011031309.0A3D9L112050543@finist-co8.sw.ru
State New
Series "ve/proc/sched/stat: Virtualize /proc/stat in a Container"
Headers show

Commit Message

Konstantin Khorenko Nov. 3, 2020, 1:09 p.m.
The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.15
------>
commit 56c2e80177276c8044704140d098d206edfd2694
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Wed Oct 28 15:47:31 2020 +0300

    sched: Fix task_group "iowait_sum" statistic accounting
    
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
    Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 kernel/sched/fair.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 23a2f2452474..6546d8511417 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1053,7 +1053,8 @@  update_stats_enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
 						delta >> 20);
 			}
 			account_scheduler_latency(tsk, delta >> 10, 0);
-		}
+		} else
+			__schedstat_add(se->statistics.iowait_sum, delta);
 	}
 }