Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757775AbcJZJRf (ORCPT ); Wed, 26 Oct 2016 05:17:35 -0400 Received: from ms01.sssup.it ([193.205.80.99]:35905 "EHLO sssup.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757670AbcJZJRa (ORCPT ); Wed, 26 Oct 2016 05:17:30 -0400 From: Tommaso Cucinotta To: Luca Abeni , Juri Lelli , Peter Zijlstra , Ingo Molnar Cc: linux-kernel@vger.kernel.org, Tommaso Cucinotta , Daniel Bistrot de Oliveira Subject: [PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched Date: Wed, 26 Oct 2016 11:17:16 +0200 Message-Id: <1477473437-10346-1-git-send-email-tommaso.cucinotta@sssup.it> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477348374-8248-1-git-send-email-tommaso.cucinotta@sssup.it> References: <1477348374-8248-1-git-send-email-tommaso.cucinotta@sssup.it> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1195 Lines: 29 This patch allows for reading the current (leftover) runtime and absolute deadline in /proc/*/sched, for debugging purposes. This revised patch: 1) has a fixed format, Signed-off-by, etc., as suggested by Juri 2) now includes related docs in Documentation/ 3) now I'm sending these e-mails with the correct From: [PATCH] sched/deadline: show leftover runtime and abs deadline in Thanks, T. -- Hi all, this is a tiny patch providing readings of the current (leftover) runtime and absolute deadline in /proc/*/sched. Mostly useful for debugging, I heard others playing with SCHED_DEADLINE had some need for similar patches as well. In addition to debugging, reading the leftover runtime is generally useful for adaptive/incremental RT logics that need to check whether there's enough runtime left for refining the computed result, or just use what we've computed so far and block till the next instance. Also, knowing what the absolute scheduling deadline is (along with what clock it refers to) might be useful for synchronization purposes. (albeit, for real production code, I wouldn't like to parse /proc anyway, rather I'd prefer to retrieve those params via eg sched_getscheduler()?)