Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1691274lqm; Fri, 3 May 2024 03:46:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVExgxATzUGtyjxsV7yGzXaKbFo9O+CkyIWFStXA95CvcilPyp2VwVRTVmsF9Xyl3ZsL0aI3NZp2wYE/WGH5YRza7OR63JuPhRg/S3hw== X-Google-Smtp-Source: AGHT+IHFbZ2612f+h3r1ay1nYRtmM87mhvMxbrgjY3dql1tUuPagb8jPTNwHcGuM9UIYZpbzR0Cu X-Received: by 2002:a05:6830:c6:b0:6ee:6675:fb47 with SMTP id x6-20020a05683000c600b006ee6675fb47mr2582819oto.0.1714733198935; Fri, 03 May 2024 03:46:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714733198; cv=pass; d=google.com; s=arc-20160816; b=zk/MDYlzT+/BlKF8r/lbldARAIi6YK+fyZ4vtRAqW+CRu4ox1MSZM8xJDq8y+8x1UY mLVbc45kgvHwVZWn7JFPp41ZdZZkIJUAu3oFcYkjQNoVH3iVoUax8TUWgex/lJdH2Fhm YE8b/67sCsccijODqs7DJajvY5cQh0Y5js8t0AwIvsqbhUT1DO8oVcqjTsSBOu/cga/W 9gAEYZ49jNa0SL7Z5gdo7HE1/EgfVeKBlAMooEGZTCYrai09mnWMvCY50zMAh07G5yNz 9mhtb2eCO3CabWR/+PQRRQxbTimIokUY+xvH5i5bYMF2JhoI17PaXwyr/oCtNJBiFiT0 tD7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=COwGv6NkGDAO9ogirJn3bJAEulOY3UBWkSXAyJn5tt8=; fh=D3wsV5SXG1Hy+/jGjqWm52ohoDD6RAS9P2qmCuzSa4g=; b=CSuZeIZRDe4kMsSryrk2webM4t9P3bBvRIb6dWJ2mZFAuoHEL1yNSDK0HTe1fhxmMK STb35sJ1lkmtpDVGNdvgGqZ15kXmAv5OIc6UdtwbPYk9vay8y2RaWwMyDWYWxRkNrzt0 ifr4U8SLGqBCPpw8j8rKMwnD9CQSOyxzOQsY6/+mdYsuj0B1AOdzkwt8PLAKUhICMLGj JoL9Ug+DDBYcXqTCQkbl2hyIlsN8OaMdV7GAQPef4qOcZr71+BxRWjVu0DiKB0XU/B+R 9psS99Zb2zlHXQCd19kC57TEx6TJS4d/fMMklWfjpag63JJhX3RVVTV6oZpoG8jWYbNK nuUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-167533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m29-20020a638c1d000000b0061b1c884b30si2050112pgd.32.2024.05.03.03.46.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 03:46:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-167533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 83229281478 for ; Fri, 3 May 2024 10:46:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1AC81509BB; Fri, 3 May 2024 10:46:32 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0DDE3FB09 for ; Fri, 3 May 2024 10:46:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714733192; cv=none; b=aSAFkFjF9aJhkd8YQlxm/5XuF7oCY8CcyJ51+76zmNMS6tqxeHFwQQmLQHL+KSXsjR5QaMel7YIGxsUyXoFWRaBI506JL3vfQv4ZA89QdsAqF0Csc6riCeQMPHTqm9sZu3tgmumXGhSh4o6Mmn0HLGSLRlQys3Zh+MahbneOvJs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714733192; c=relaxed/simple; bh=Xu+MEc83F0sPC2uSubWXEVi0fScQCsXeIJa+ZhEvoW0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=LnXfCxsvH5N4OIudj3QbGgPes26SOWFiprkLm7xKEKLA0/cDofrR93k22MOYxTxi8C44+2yJopQFbv6NLw9NYxyHx5VgYM+ZdvIZkUyw9eIPPGG4YU92qsYEr4YhdfbWh2sTvqhIoKRRSiKbEFweiqtCv/fQ/sDpC77BAqL1KDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BCC8F2F4; Fri, 3 May 2024 03:46:53 -0700 (PDT) Received: from e125579.speedport.ip (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AF1613F793; Fri, 3 May 2024 03:46:25 -0700 (PDT) From: Dietmar Eggemann To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Cc: Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH] sched/fair: Add stats update for cfs_rq->exec_clock in update_curr() again Date: Fri, 3 May 2024 12:46:05 +0200 Message-Id: <20240503104605.1871571-1-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit 5d69eca542ee ("sched: Unify runtime accounting across classes") removed it and since then: echo 1 > /proc/sys/kernel/sched_schedstats cat /sys/kernel/debug/sched/debug | grep exec_clock returns: .exec_clock : 0.000000 for all cfs_rq's. Put the schedstat_add() back to be able to watch the cfs_rq runtime statistic. Signed-off-by: Dietmar Eggemann --- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9eb63573110c..37bb3cee6fec 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1158,6 +1158,7 @@ static void update_curr(struct cfs_rq *cfs_rq) delta_exec = update_curr_se(rq_of(cfs_rq), curr); if (unlikely(delta_exec <= 0)) return; + schedstat_add(cfs_rq->exec_clock, delta_exec); curr->vruntime += calc_delta_fair(delta_exec, curr); update_deadline(cfs_rq, curr); -- 2.25.1