From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 774398F4A for ; Wed, 29 Jan 2025 18:04:52 +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=1738173894; cv=none; b=W+lqEMLJVNe/Ifq/vwN8xNTuTxjXHW9K0DXRKGpcWfLXAmmAQM4te7ewu/JSNgSZIPhBhHzE2VJhFcXLNOcbSg9iBuyHauT1kUn3zh62uIE40nZCXvabbuvF2qt6UHfe/gVPwgoNzaJUbxUGxhRv6hHpxzDerDuYRjZXeYrXQSY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738173894; c=relaxed/simple; bh=nL2C4+mq9adCUTVYi7FyxMnSUlXuU9FUJKM/WjcGQX0=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=eo9E75Yimo7NYFB19Ywt4AHvXQ2mTWPHB93cCdx5KlRit34Sqe27OprTRYfYHuWusQAeQtg8inBAkRvLL3D6vGwZN5NgztOWfxRw/DDK3HUAjjWWh21U+uLbkMUil9zq4y4dU/fQmIr0HxYvutJdJzCuLM0obq4SNSLxCp9c/uI= 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 9F851497; Wed, 29 Jan 2025 10:05:17 -0800 (PST) Received: from [10.1.35.45] (e127648.arm.com [10.1.35.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 51B2B3F694; Wed, 29 Jan 2025 10:04:50 -0800 (PST) Message-ID: <659b272b-b27e-44a8-b8dd-a6821c1daeba@arm.com> Date: Wed, 29 Jan 2025 18:04:48 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sched/debug: Print slice length for fair tasks From: Christian Loehle To: "linux-kernel@vger.kernel.org" , Peter Zijlstra Cc: Ingo Molnar , Juri Lelli , Steven Rostedt , Vincent Guittot , Valentin Schneider , Petre-Ionut Tudor References: <453349b1-1637-42f5-a7b2-2385392b5956@arm.com> Content-Language: en-US In-Reply-To: <453349b1-1637-42f5-a7b2-2385392b5956@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/29/25 17:59, Christian Loehle wrote: > With commit 857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime > to set request/slice suggestion") we have the userspace per-task tunable > slice length so print it in /proc/$PID/sched. > > Signed-off-by: Christian Loehle > --- > kernel/sched/debug.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c > index fd7e85220715..ef047add7f9e 100644 > --- a/kernel/sched/debug.c > +++ b/kernel/sched/debug.c > @@ -1262,6 +1262,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns, > if (task_has_dl_policy(p)) { > P(dl.runtime); > P(dl.deadline); > + } else if (fair_policy(p->policy)) { > + P(se.slice); > } > #ifdef CONFIG_SCHED_CLASS_EXT > __PS("ext.enabled", task_on_scx(p)); So Peter added a debug slice length print for all tasks on the rq in commit ("147f3efaa241 sched/fair: Implement an EEVDF-like scheduling policy") already, but that alone is a bit awkward to play with when modifying slice length for specific tasks which aren't always enqueued.