From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 15764808A3 for ; Wed, 14 Oct 2026 11:17:55 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69EBGbec031133; Wed, 14 Oct 2026 14:16:38 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69EBGbec031133 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="pNVA0ZKu" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69EBGa5e031113 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 14 Oct 2026 14:16:36 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69EBGa5e031113 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48b0a199b20so3346031f8f.1 for ; Wed, 14 Oct 2026 04:16:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxcGRQpOUjFb465zQ6CmIcnOpHZsy3UM7HrdkUF9OjRO+SXzxAjScI59b8PgUVhmNWIbBhShQ==@openvz.org X-Gm-Message-State: AFq9FYLeUw6A7RZUxQcNj00uAYe+QzIyUmZhKk++4dGg1NQrJqsbW6WS PEtCuQeNqcalKXaD532MeVEmKlvBaqEh4195wtAbYyfCL9AbRpWZ+Y9Q76uqe7KClU3dOoDTJhp zW+LjySPdMAmLDQmTGbHlweCJMVrGmrulTfGX67Ps3EjxXU2YNZiUxg== X-Gm-Gg: AYBFou1Wak85tdPtOz1onfVdNY3oSRS/P1O5riaA7pZ7O6CLzajQlhDsIaqUkrP0qo2 qfiliHG/Zg/FHqdSBWQ4fa6YlkIaQw24O+zGHIS/5b5rhSi8wDYfmZzGnktDHLwvFPYnEI9ZroR FI/JktccQZiexfJWRbzAzssfb98zD9079J+rjFwuD76F586aq55BjHOiaMHzr6N+x9jToNw6w04 kLyIYkbNU7qu9fJhWjwE5y3hEEnyXIkc29B2O8pHTjMmtnDH0KHG0aYegFGiZ2fAM2ZQ+678F95 NOVL7tZBGmHbqGU5AS4n1rJtAR7d+I/8dgJ+K58/Rf7/8A5CL3KnXC5BSLYzprwXoo/P2ubgKxV ANyvieeDTMBSxiDQDre4A2C9ww/S7Ww== X-Received: by 2002:a05:600c:5397:b0:4a1:7ba9:da2c with SMTP id 5b1f17b1804b1-4a18e4a7cacmr302512925e9.25.1791976596136; Wed, 14 Oct 2026 04:16:36 -0700 (PDT) X-Received: by 2002:a05:600c:5397:b0:4a1:7ba9:da2c with SMTP id 5b1f17b1804b1-4a18e4a7cacmr302512395e9.25.1791976595593; Wed, 14 Oct 2026 04:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1791976595; cv=none; d=google.com; s=arc-20260327; b=mfUcij8/h02EEU35O/t1SLDWPhIj8cjUKoneagV26G4WL/DjBwaAw0wRAlArCzWr6Z Yh7zbdANMGhxWFpQyunTx0FfyCEYERn1D0BOTOB8TT0axtTr4bF/cY9GqrG7hdbpnATp c7PoTaszPNmTiqn0DntgPdYDTXZmFOH5yHfQ3UpHw+u7mxwL/ZqnFH2ciVvwCkeZ+xCY u9BVKuI7VUCOzkIrUlI1kuWAR2E9Oyt5sFzAIlqB46gYGQ/JX/CTY6He6lLytw2nlzWr TY/upir5p0hGJjPknR7RIs7ILwmxot2AAZWTh5C6IPwmKapIrFYN3lat7NAm2jD5djGZ mPLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:dkim-signature; bh=pJm5ORgZF8R5mF8UVt2RAM8Am61OGPp3wg8ZQxq+GSs=; fh=YUVjC/9FtpTN0Is9ifTJrOsbz/J/onroleA8inR1Ce8=; b=Fw6TI2AJUnH/VMGKhzSi2w0GvcJ+63mYWiuJPlQc3fLRfrvT953/pypN9JzuQ59Wxd GSYQKzxMkaKF2oyiT66jf1wLEmckqXJUvVwvKu2MoDEsI/bWPieGKyAQeIO+cS8e1X5/ w8fa7JIPvUwbH8sHT5qn2KzplNWKkpS2XdCq27kd4OrHuasGc8PJyZ08I0TXYT5THhnn SOlvOrO8/Edt0TbPhDM9+7FhAUWuKZBMGGNO0IyrLCiifSwevjTX3Wb6+KFf4GF/jrBL Q1LqueUEwiIUkO/RrW8I26wqlGbINLwI3wKm/TpE2Q6mzHHjxXgKtm9vnNg+kJ5J+E1Q WVjA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=pNVA0ZKu; spf=pass (google.com: domain of vasileios.almpanis@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vasileios.almpanis@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48de0beaddcsi10834214f8f.268.2026.10.14.04.16.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 04:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of vasileios.almpanis@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=pNVA0ZKu; spf=pass (google.com: domain of vasileios.almpanis@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vasileios.almpanis@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Message-Id:Date:Subject :From; bh=pJm5ORgZF8R5mF8UVt2RAM8Am61OGPp3wg8ZQxq+GSs=; b=pNVA0ZKupgvFScT3Icv 4uXws6veS89o3MtA8poqXCgxsnRaf+oZa4fQNYmrP8ksQ5MQKkh6beneQnmC7S9+p2scixzFEMHfB xbzCF/S3J2TqtRmgHzShjEIuPP7UoszGZ1K182SWaquTfBq/Y4rCRaj53dl2yjI6YtuLxPDgx8KdV 0k18IUKO50rJeHrlchU49cXamaOKla5+mpKIyGCth6ZHxVIqzWhJwh29A8Yer/iYEQq96kgyWqhMm TDaj1BATg1fCfc6VfgBBFBU/hopzAbVH4v1WHgrAPH6NcalANndBUFb5XKe59uu+2n1wU5qrGgvfD NooBEGhTcShcsZw==; Received: from [130.117.225.5] (helo=dev010.ch-qa.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xGwus-001CVN-1J; Wed, 14 Oct 2026 13:16:34 +0200 From: Vasileios Almpanis Date: Wed, 14 Oct 2026 11:16:23 +0000 Message-Id: <20261014-ct-iowait-v1-0-9d65fe37cf89@virtuozzo.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAIdkz2oC/yWMwQ6CMBAFf4W8s0vYNpLqrxgPpaywHMC0VUkI/ 07V42QmsyFJVEm4VhuivDXpMhfgU4Uw+nkQ0r4wTGNabthSyKTLx2um3snFW9M5tmeU/hnloev vdcMYlFzNuP9FenWThPw9Yd8PkDMCuHYAAAA= X-Change-ID: 20261013-ct-iowait-d8e9a32b8135 To: Konstantin Khorenko , Pavel Tikhomirov X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1791976595; l=2236; i=vasileios.almpanis@virtuozzo.com; s=20260812; h=from:subject:message-id; bh=Aq9okZFQzf6NO/wekm75S4FxoQ4cJ+Lna7unSLb2xmU=; b=dqNupIwTheoYP/0E4DFqtV3toG9itiVOJQQDzXrC5//90JtS4TcTDXVru362/B3jmsjvg1o/o PeJNUMTlLLCDM0AwP9LHMMVOWIgWZF7FHgf/IxU6SH8mqy9ty+Lti6k X-Developer-Key: i=vasileios.almpanis@virtuozzo.com; a=ed25519; pk=HhuHDXAcPva9A8zccWEMRsb36reu+y4IVbBjXKxNUjw= X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 0/4] sched: restore Container iowait accounting X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Container iowait is always 0 on vz10, both in cpu.proc.stat and in the CT's /proc/stat, so top inside a CT shows 0 wa. Two things are broken. cfs_rq::nr_iowait goes out of balance on a few paths, and the group entity never gets sleep_start/block_start, so neither idle nor iowait is accounted for the group. The counter has to be fixed first, otherwise the groups would look blocked forever. Patch 1 fixes the nr_iowait leak on the remote wakeup path. Patch 2 fixes nr_iowait for throttled and class changing tasks. Patch 3 accounts sleep and block time of the group entity. Patch 4 switches a sleeping group between idle and iowait. The accounting depends on kernel.sched_schedstats=1, same as on vz7. Known issues: - If kernel.sched_schedstats is switched off while a group entity has an open sleep or block period, the stamp stays set and cpu.proc.stat keeps adding idle or iowait until the group is enqueued again, even after schedstats are back on. This can be fixed separately by clearing the stamps in set_schedstats(). - cfs_rq::nr_iowait is not hierarchical, so a CT that runs its IO in nested cpu cgroups shows it as idle. Tested on a vz10 node with direct IO reads in a CT, with CPU and IO limits, and with class switches, cgroup moves and affinity changes during IO. fio shows no difference against the base kernel. https://virtuozzo.atlassian.net/browse/VSTOR-147823 Signed-off-by: Vasileios Almpanis --- Vasileios Almpanis (4): sched: fix cfs_rq::nr_iowait leak on the remote wakeup path sched: keep cfs_rq::nr_iowait balanced for throttled and class changing tasks sched: account sleep and block time of a task group entity sched: switch a sleeping task group entity between idle and iowait kernel/sched/core.c | 35 ++++++++++++++++++----------- kernel/sched/fair.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-- kernel/sched/sched.h | 12 ++++++++++ 3 files changed, 94 insertions(+), 15 deletions(-) --- base-commit: defa968cbe8c38f1ff0231042dee07f00d27b2c9 change-id: 20261013-ct-iowait-d8e9a32b8135 -- Best regards, Vasileios Almpanis Software Developer, Virtuozzo. _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel