Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,11 @@ struct sched_cache_stat {
struct sched_cache_time __percpu *pcpu_time;
raw_spinlock_t lock;
unsigned long epoch;
unsigned long last_reset_tick;
unsigned long next_scan;
unsigned long scan_period;
u64 nr_running_avg;
int need_scan;
int cpu;
} ____cacheline_aligned_in_smp;

Expand Down
4 changes: 4 additions & 0 deletions include/linux/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ static inline const struct cpumask *cpu_node_mask(int cpu)
return cpumask_of_node(cpu_to_node(cpu));
}

#define NR_LLCS NR_CPUS
int llc_to_node(int llc);
int llc_distance(int llc0, int llc1);

#ifdef CONFIG_NUMA
int sched_numa_find_nth_cpu(const struct cpumask *cpus, int cpu, int node);
extern const struct cpumask *sched_numa_hop_mask(unsigned int node, unsigned int hops);
Expand Down
8 changes: 8 additions & 0 deletions kernel/sched/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,14 @@ static __init int sched_init_debug(void)
#ifdef CONFIG_SCHED_CACHE
debugfs_create_file("llc_enabled", 0644, debugfs_sched, NULL,
&sched_cache_enable_fops);
debugfs_create_u32("llc_override_numa_balance", 0644, debugfs_sched,
&llc_override_numa_balance);
debugfs_create_u32("llc_scan_period_max", 0644, debugfs_sched,
&llc_scan_period_max);
debugfs_create_u32("llc_scan_period_min", 0644, debugfs_sched,
&llc_scan_period_min);
debugfs_create_u32("llc_scan_period_threshold", 0644, debugfs_sched,
&llc_scan_period_threshold);
debugfs_create_u32("llc_aggr_tolerance", 0644, debugfs_sched,
&llc_aggr_tolerance);
debugfs_create_u32("llc_epoch_period", 0644, debugfs_sched,
Expand Down
Loading