mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tor Vic <torvic9@mailbox.org>
To: peterz@infradead.org, mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	kprateek.nayak@amd.com
Cc: linux-kernel@vger.kernel.org, Tor Vic <torvic9@mailbox.org>
Subject: [RFC PATCH 1/2] sched/fair: Remove the 'none' and 'linear' scaling of tunables
Date: Fri,  2 Oct 2026 14:45:37 +0200	[thread overview]
Message-ID: <20261002124538.79658-2-torvic9@mailbox.org> (raw)
In-Reply-To: <20261002124538.79658-1-torvic9@mailbox.org>

Get rid of the tunable scalings 'none' and 'linear' as these do not
appear to be very useful.

Only keep the 'log' scaling, which is already the default.

Signed-off-by: Tor Vic <torvic9@mailbox.org>
---
 include/linux/sched/sysctl.h |  7 -----
 kernel/sched/debug.c         | 52 ------------------------------------
 kernel/sched/fair.c          | 28 +------------------
 kernel/sched/sched.h         |  2 --
 4 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 5a64582b086b..0b923cc771e0 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -12,13 +12,6 @@ extern unsigned long sysctl_hung_task_timeout_secs;
 enum { sysctl_hung_task_timeout_secs = 0 };
 #endif
 
-enum sched_tunable_scaling {
-	SCHED_TUNABLESCALING_NONE,
-	SCHED_TUNABLESCALING_LOG,
-	SCHED_TUNABLESCALING_LINEAR,
-	SCHED_TUNABLESCALING_END,
-};
-
 #define NUMA_BALANCING_DISABLED		0x0
 #define NUMA_BALANCING_NORMAL		0x1
 #define NUMA_BALANCING_MEMORY_TIERING	0x2
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 72236db67983..b159d7a1cfa2 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -170,46 +170,6 @@ static const struct file_operations sched_feat_fops = {
 	.release	= single_release,
 };
 
-static ssize_t sched_scaling_write(struct file *filp, const char __user *ubuf,
-				   size_t cnt, loff_t *ppos)
-{
-	unsigned int scaling;
-	int ret;
-
-	ret = kstrtouint_from_user(ubuf, cnt, 10, &scaling);
-	if (ret)
-		return ret;
-
-	if (scaling >= SCHED_TUNABLESCALING_END)
-		return -EINVAL;
-
-	sysctl_sched_tunable_scaling = scaling;
-	if (sched_update_scaling())
-		return -EINVAL;
-
-	*ppos += cnt;
-	return cnt;
-}
-
-static int sched_scaling_show(struct seq_file *m, void *v)
-{
-	seq_printf(m, "%d\n", sysctl_sched_tunable_scaling);
-	return 0;
-}
-
-static int sched_scaling_open(struct inode *inode, struct file *filp)
-{
-	return single_open(filp, sched_scaling_show, NULL);
-}
-
-static const struct file_operations sched_scaling_fops = {
-	.open		= sched_scaling_open,
-	.write		= sched_scaling_write,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
 #ifdef CONFIG_SCHED_CACHE
 static ssize_t
 sched_cache_enable_write(struct file *filp, const char __user *ubuf,
@@ -726,7 +686,6 @@ static __init int sched_init_debug(void)
 	debugfs_create_u32("latency_warn_ms", 0644, debugfs_sched, &sysctl_resched_latency_warn_ms);
 	debugfs_create_u32("latency_warn_once", 0644, debugfs_sched, &sysctl_resched_latency_warn_once);
 
-	debugfs_create_file("tunable_scaling", 0644, debugfs_sched, NULL, &sched_scaling_fops);
 	debugfs_create_u32("migration_cost_ns", 0644, debugfs_sched, &sysctl_sched_migration_cost);
 	debugfs_create_u32("nr_migrate", 0644, debugfs_sched, &sysctl_sched_nr_migrate);
 
@@ -1238,12 +1197,6 @@ do {									\
 	SEQ_printf(m, "\n");
 }
 
-static const char *sched_tunable_scaling_names[] = {
-	"none",
-	"logarithmic",
-	"linear"
-};
-
 static void sched_debug_header(struct seq_file *m)
 {
 	u64 ktime, sched_clk, cpu_clk;
@@ -1286,11 +1239,6 @@ static void sched_debug_header(struct seq_file *m)
 #undef PN
 #undef P
 
-	SEQ_printf(m, "  .%-40s: %d (%s)\n",
-		"sysctl_sched_tunable_scaling",
-		sysctl_sched_tunable_scaling,
-		sched_tunable_scaling_names[sysctl_sched_tunable_scaling]);
-	SEQ_printf(m, "\n");
 }
 
 static int sched_debug_show(struct seq_file *m, void *v)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 57360f5cdde4..2f9b7d2fe813 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -61,19 +61,6 @@
 #include "stats.h"
 #include "autogroup.h"
 
-/*
- * The initial- and re-scaling of tunables is configurable
- *
- * Options are:
- *
- *   SCHED_TUNABLESCALING_NONE - unscaled, always *1
- *   SCHED_TUNABLESCALING_LOG - scaled logarithmically, *1+ilog(ncpus)
- *   SCHED_TUNABLESCALING_LINEAR - scaled linear, *ncpus
- *
- * (default SCHED_TUNABLESCALING_LOG = *(1+ilog(ncpus))
- */
-unsigned int sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_LOG;
-
 /*
  * Default base time slice (request size r_i) for SCHED_NORMAL/SCHED_BATCH:
  *
@@ -198,20 +185,7 @@ static inline void update_load_set(struct load_weight *lw, unsigned long w)
 static unsigned int get_update_sysctl_factor(void)
 {
 	unsigned int cpus = min_t(unsigned int, num_online_cpus(), 8);
-	unsigned int factor;
-
-	switch (sysctl_sched_tunable_scaling) {
-	case SCHED_TUNABLESCALING_NONE:
-		factor = 1;
-		break;
-	case SCHED_TUNABLESCALING_LINEAR:
-		factor = cpus;
-		break;
-	case SCHED_TUNABLESCALING_LOG:
-	default:
-		factor = 1 + ilog2(cpus);
-		break;
-	}
+	unsigned int factor = 1 + ilog2(cpus);
 
 	return factor;
 }
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index e656c7059bf8..7a36b3210757 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -3153,8 +3153,6 @@ extern unsigned int sysctl_sched_base_slice;
 extern int sysctl_resched_latency_warn_ms;
 extern int sysctl_resched_latency_warn_once;
 
-extern unsigned int sysctl_sched_tunable_scaling;
-
 extern unsigned int sysctl_numa_balancing_scan_delay;
 extern unsigned int sysctl_numa_balancing_scan_period_min;
 extern unsigned int sysctl_numa_balancing_scan_period_max;
-- 
2.55.0


  reply	other threads:[~2026-10-02 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 12:45 [RFC PATCH 0/2] sched/fair: Remove tunable scaling Tor Vic
2026-10-02 12:45 ` Tor Vic [this message]
2026-10-02 12:45 ` [RFC PATCH 2/2] sched/fair: Remove sched_base_slice scaling altogether Tor Vic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261002124538.79658-2-torvic9@mailbox.org \
    --to=torvic9@mailbox.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®