linux/include/linux/sched/sysctl.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#ifndef _LINUX_SCHED_SYSCTL_H
   3#define _LINUX_SCHED_SYSCTL_H
   4
   5#include <linux/types.h>
   6
   7struct ctl_table;
   8
   9#ifdef CONFIG_DETECT_HUNG_TASK
  10
  11#ifdef CONFIG_SMP
  12extern unsigned int sysctl_hung_task_all_cpu_backtrace;
  13#else
  14#define sysctl_hung_task_all_cpu_backtrace 0
  15#endif /* CONFIG_SMP */
  16
  17extern int           sysctl_hung_task_check_count;
  18extern unsigned int  sysctl_hung_task_panic;
  19extern unsigned long sysctl_hung_task_timeout_secs;
  20extern unsigned long sysctl_hung_task_check_interval_secs;
  21extern int sysctl_hung_task_warnings;
  22int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
  23                void *buffer, size_t *lenp, loff_t *ppos);
  24#else
  25/* Avoid need for ifdefs elsewhere in the code */
  26enum { sysctl_hung_task_timeout_secs = 0 };
  27#endif
  28
  29extern unsigned int sysctl_sched_child_runs_first;
  30
  31extern unsigned int sysctl_sched_latency;
  32extern unsigned int sysctl_sched_min_granularity;
  33extern unsigned int sysctl_sched_wakeup_granularity;
  34
  35enum sched_tunable_scaling {
  36        SCHED_TUNABLESCALING_NONE,
  37        SCHED_TUNABLESCALING_LOG,
  38        SCHED_TUNABLESCALING_LINEAR,
  39        SCHED_TUNABLESCALING_END,
  40};
  41extern unsigned int sysctl_sched_tunable_scaling;
  42
  43extern unsigned int sysctl_numa_balancing_scan_delay;
  44extern unsigned int sysctl_numa_balancing_scan_period_min;
  45extern unsigned int sysctl_numa_balancing_scan_period_max;
  46extern unsigned int sysctl_numa_balancing_scan_size;
  47
  48#ifdef CONFIG_SCHED_DEBUG
  49extern __read_mostly unsigned int sysctl_sched_migration_cost;
  50extern __read_mostly unsigned int sysctl_sched_nr_migrate;
  51
  52extern int sysctl_resched_latency_warn_ms;
  53extern int sysctl_resched_latency_warn_once;
  54#endif
  55
  56/*
  57 *  control realtime throttling:
  58 *
  59 *  /proc/sys/kernel/sched_rt_period_us
  60 *  /proc/sys/kernel/sched_rt_runtime_us
  61 */
  62extern unsigned int sysctl_sched_rt_period;
  63extern int sysctl_sched_rt_runtime;
  64
  65extern unsigned int sysctl_sched_dl_period_max;
  66extern unsigned int sysctl_sched_dl_period_min;
  67
  68#ifdef CONFIG_UCLAMP_TASK
  69extern unsigned int sysctl_sched_uclamp_util_min;
  70extern unsigned int sysctl_sched_uclamp_util_max;
  71extern unsigned int sysctl_sched_uclamp_util_min_rt_default;
  72#endif
  73
  74#ifdef CONFIG_CFS_BANDWIDTH
  75extern unsigned int sysctl_sched_cfs_bandwidth_slice;
  76#endif
  77
  78#ifdef CONFIG_SCHED_AUTOGROUP
  79extern unsigned int sysctl_sched_autogroup_enabled;
  80#endif
  81
  82extern int sysctl_sched_rr_timeslice;
  83extern int sched_rr_timeslice;
  84
  85int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
  86                size_t *lenp, loff_t *ppos);
  87int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
  88                size_t *lenp, loff_t *ppos);
  89int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
  90                void *buffer, size_t *lenp, loff_t *ppos);
  91int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
  92                size_t *lenp, loff_t *ppos);
  93int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
  94                size_t *lenp, loff_t *ppos);
  95
  96#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
  97extern unsigned int sysctl_sched_energy_aware;
  98int sched_energy_aware_handler(struct ctl_table *table, int write,
  99                void *buffer, size_t *lenp, loff_t *ppos);
 100#endif
 101
 102#endif /* _LINUX_SCHED_SYSCTL_H */
 103