Commit 8fa37a68 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sysctl-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux

Pull sysctl updates from Luis Chamberlain:
 "Only a small step forward on the sysctl cleanups for this cycle"

* tag 'sysctl-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
  sched: Move numa_balancing sysctls to its own file
parents 3ba2c3ff 0dff89c4
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include <linux/types.h> #include <linux/types.h>
struct ctl_table;
#ifdef CONFIG_DETECT_HUNG_TASK #ifdef CONFIG_DETECT_HUNG_TASK
/* used for hung_task and block/ */ /* used for hung_task and block/ */
extern unsigned long sysctl_hung_task_timeout_secs; extern unsigned long sysctl_hung_task_timeout_secs;
...@@ -27,12 +25,8 @@ enum sched_tunable_scaling { ...@@ -27,12 +25,8 @@ enum sched_tunable_scaling {
#ifdef CONFIG_NUMA_BALANCING #ifdef CONFIG_NUMA_BALANCING
extern int sysctl_numa_balancing_mode; extern int sysctl_numa_balancing_mode;
extern unsigned int sysctl_numa_balancing_promote_rate_limit;
#else #else
#define sysctl_numa_balancing_mode 0 #define sysctl_numa_balancing_mode 0
#endif #endif
int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
size_t *lenp, loff_t *ppos);
#endif /* _LINUX_SCHED_SYSCTL_H */ #endif /* _LINUX_SCHED_SYSCTL_H */
...@@ -4443,7 +4443,7 @@ static void reset_memory_tiering(void) ...@@ -4443,7 +4443,7 @@ static void reset_memory_tiering(void)
} }
} }
int sysctl_numa_balancing(struct ctl_table *table, int write, static int sysctl_numa_balancing(struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos) void *buffer, size_t *lenp, loff_t *ppos)
{ {
struct ctl_table t; struct ctl_table t;
...@@ -4570,6 +4570,17 @@ static struct ctl_table sched_core_sysctls[] = { ...@@ -4570,6 +4570,17 @@ static struct ctl_table sched_core_sysctls[] = {
.proc_handler = sysctl_sched_uclamp_handler, .proc_handler = sysctl_sched_uclamp_handler,
}, },
#endif /* CONFIG_UCLAMP_TASK */ #endif /* CONFIG_UCLAMP_TASK */
#ifdef CONFIG_NUMA_BALANCING
{
.procname = "numa_balancing",
.data = NULL, /* filled in by handler */
.maxlen = sizeof(unsigned int),
.mode = 0644,
.proc_handler = sysctl_numa_balancing,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_FOUR,
},
#endif /* CONFIG_NUMA_BALANCING */
{} {}
}; };
static int __init sched_core_sysctl_init(void) static int __init sched_core_sysctl_init(void)
......
...@@ -178,6 +178,11 @@ int __weak arch_asym_cpu_priority(int cpu) ...@@ -178,6 +178,11 @@ int __weak arch_asym_cpu_priority(int cpu)
static unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; static unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
#endif #endif
#ifdef CONFIG_NUMA_BALANCING
/* Restrict the NUMA promotion throughput (MB/s) for each target node. */
static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536;
#endif
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static struct ctl_table sched_fair_sysctls[] = { static struct ctl_table sched_fair_sysctls[] = {
{ {
...@@ -197,6 +202,16 @@ static struct ctl_table sched_fair_sysctls[] = { ...@@ -197,6 +202,16 @@ static struct ctl_table sched_fair_sysctls[] = {
.extra1 = SYSCTL_ONE, .extra1 = SYSCTL_ONE,
}, },
#endif #endif
#ifdef CONFIG_NUMA_BALANCING
{
.procname = "numa_balancing_promote_rate_limit_MBps",
.data = &sysctl_numa_balancing_promote_rate_limit,
.maxlen = sizeof(unsigned int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
},
#endif /* CONFIG_NUMA_BALANCING */
{} {}
}; };
...@@ -1094,9 +1109,6 @@ unsigned int sysctl_numa_balancing_scan_delay = 1000; ...@@ -1094,9 +1109,6 @@ unsigned int sysctl_numa_balancing_scan_delay = 1000;
/* The page with hint page fault latency < threshold in ms is considered hot */ /* The page with hint page fault latency < threshold in ms is considered hot */
unsigned int sysctl_numa_balancing_hot_threshold = MSEC_PER_SEC; unsigned int sysctl_numa_balancing_hot_threshold = MSEC_PER_SEC;
/* Restrict the NUMA promotion throughput (MB/s) for each target node. */
unsigned int sysctl_numa_balancing_promote_rate_limit = 65536;
struct numa_group { struct numa_group {
refcount_t refcount; refcount_t refcount;
......
...@@ -1633,25 +1633,6 @@ int proc_do_static_key(struct ctl_table *table, int write, ...@@ -1633,25 +1633,6 @@ int proc_do_static_key(struct ctl_table *table, int write,
} }
static struct ctl_table kern_table[] = { static struct ctl_table kern_table[] = {
#ifdef CONFIG_NUMA_BALANCING
{
.procname = "numa_balancing",
.data = NULL, /* filled in by handler */
.maxlen = sizeof(unsigned int),
.mode = 0644,
.proc_handler = sysctl_numa_balancing,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_FOUR,
},
{
.procname = "numa_balancing_promote_rate_limit_MBps",
.data = &sysctl_numa_balancing_promote_rate_limit,
.maxlen = sizeof(unsigned int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
},
#endif /* CONFIG_NUMA_BALANCING */
{ {
.procname = "panic", .procname = "panic",
.data = &panic_timeout, .data = &panic_timeout,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment