aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2007-08-09 05:16:46 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-09 05:16:46 -0400
commite0361851e5647cdd62fd5c367df5d7e145769d04 (patch)
tree77f2c4f3f2c5a75ab7a5cdbc9113a2445aac9cbc /kernel/sched.c
parentfd8bb43e27bbba1b6d49552c3d588cf741dd44af (diff)
sched: remove binary sysctls from kernel.sched_domain
kernel.sched_domain hierarchy is under CTL_UNNUMBERED and thus unreachable to sysctl(2). Generating .ctl_number's in such situation is not useful. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 49f5b281c56..85b93118d24 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5217,12 +5217,19 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
5217#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL) 5217#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
5218 5218
5219static struct ctl_table sd_ctl_dir[] = { 5219static struct ctl_table sd_ctl_dir[] = {
5220 {CTL_UNNUMBERED, "sched_domain", NULL, 0, 0755, NULL, }, 5220 {
5221 .procname = "sched_domain",
5222 .mode = 0755,
5223 },
5221 {0,}, 5224 {0,},
5222}; 5225};
5223 5226
5224static struct ctl_table sd_ctl_root[] = { 5227static struct ctl_table sd_ctl_root[] = {
5225 {CTL_UNNUMBERED, "kernel", NULL, 0, 0755, sd_ctl_dir, }, 5228 {
5229 .procname = "kernel",
5230 .mode = 0755,
5231 .child = sd_ctl_dir,
5232 },
5226 {0,}, 5233 {0,},
5227}; 5234};
5228 5235
@@ -5238,11 +5245,10 @@ static struct ctl_table *sd_alloc_ctl_entry(int n)
5238} 5245}
5239 5246
5240static void 5247static void
5241set_table_entry(struct ctl_table *entry, int ctl_name, 5248set_table_entry(struct ctl_table *entry,
5242 const char *procname, void *data, int maxlen, 5249 const char *procname, void *data, int maxlen,
5243 mode_t mode, proc_handler *proc_handler) 5250 mode_t mode, proc_handler *proc_handler)
5244{ 5251{
5245 entry->ctl_name = ctl_name;
5246 entry->procname = procname; 5252 entry->procname = procname;
5247 entry->data = data; 5253 entry->data = data;
5248 entry->maxlen = maxlen; 5254 entry->maxlen = maxlen;
@@ -5255,28 +5261,28 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
5255{ 5261{
5256 struct ctl_table *table = sd_alloc_ctl_entry(14); 5262 struct ctl_table *table = sd_alloc_ctl_entry(14);
5257 5263
5258 set_table_entry(&table[0], 1, "min_interval", &sd->min_interval, 5264 set_table_entry(&table[0], "min_interval", &sd->min_interval,
5259 sizeof(long), 0644, proc_doulongvec_minmax); 5265 sizeof(long), 0644, proc_doulongvec_minmax);
5260 set_table_entry(&table[1], 2, "max_interval", &sd->max_interval, 5266 set_table_entry(&table[1], "max_interval", &sd->max_interval,
5261 sizeof(long), 0644, proc_doulongvec_minmax); 5267 sizeof(long), 0644, proc_doulongvec_minmax);
5262 set_table_entry(&table[2], 3, "busy_idx", &sd->busy_idx, 5268 set_table_entry(&table[2], "busy_idx", &sd->busy_idx,
5263 sizeof(int), 0644, proc_dointvec_minmax); 5269 sizeof(int), 0644, proc_dointvec_minmax);
5264 set_table_entry(&table[3], 4, "idle_idx", &sd->idle_idx, 5270 set_table_entry(&table[3], "idle_idx", &sd->idle_idx,
5265 sizeof(int), 0644, proc_dointvec_minmax); 5271 sizeof(int), 0644, proc_dointvec_minmax);
5266 set_table_entry(&table[4], 5, "newidle_idx", &sd->newidle_idx, 5272 set_table_entry(&table[4], "newidle_idx", &sd->newidle_idx,
5267 sizeof(int), 0644, proc_dointvec_minmax); 5273 sizeof(int), 0644, proc_dointvec_minmax);
5268 set_table_entry(&table[5], 6, "wake_idx", &sd->wake_idx, 5274 set_table_entry(&table[5], "wake_idx", &sd->wake_idx,
5269 sizeof(int), 0644, proc_dointvec_minmax); 5275 sizeof(int), 0644, proc_dointvec_minmax);
5270 set_table_entry(&table[6], 7, "forkexec_idx", &sd->forkexec_idx, 5276 set_table_entry(&table[6], "forkexec_idx", &sd->forkexec_idx,
5271 sizeof(int), 0644, proc_dointvec_minmax); 5277 sizeof(int), 0644, proc_dointvec_minmax);
5272 set_table_entry(&table[7], 8, "busy_factor", &sd->busy_factor, 5278 set_table_entry(&table[7], "busy_factor", &sd->busy_factor,
5273 sizeof(int), 0644, proc_dointvec_minmax); 5279 sizeof(int), 0644, proc_dointvec_minmax);
5274 set_table_entry(&table[8], 9, "imbalance_pct", &sd->imbalance_pct, 5280 set_table_entry(&table[8], "imbalance_pct", &sd->imbalance_pct,
5275 sizeof(int), 0644, proc_dointvec_minmax); 5281 sizeof(int), 0644, proc_dointvec_minmax);
5276 set_table_entry(&table[10], 11, "cache_nice_tries", 5282 set_table_entry(&table[10], "cache_nice_tries",
5277 &sd->cache_nice_tries, 5283 &sd->cache_nice_tries,
5278 sizeof(int), 0644, proc_dointvec_minmax); 5284 sizeof(int), 0644, proc_dointvec_minmax);
5279 set_table_entry(&table[12], 13, "flags", &sd->flags, 5285 set_table_entry(&table[12], "flags", &sd->flags,
5280 sizeof(int), 0644, proc_dointvec_minmax); 5286 sizeof(int), 0644, proc_dointvec_minmax);
5281 5287
5282 return table; 5288 return table;
@@ -5296,7 +5302,6 @@ static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
5296 i = 0; 5302 i = 0;
5297 for_each_domain(cpu, sd) { 5303 for_each_domain(cpu, sd) {
5298 snprintf(buf, 32, "domain%d", i); 5304 snprintf(buf, 32, "domain%d", i);
5299 entry->ctl_name = i + 1;
5300 entry->procname = kstrdup(buf, GFP_KERNEL); 5305 entry->procname = kstrdup(buf, GFP_KERNEL);
5301 entry->mode = 0755; 5306 entry->mode = 0755;
5302 entry->child = sd_alloc_ctl_domain_table(sd); 5307 entry->child = sd_alloc_ctl_domain_table(sd);
@@ -5317,7 +5322,6 @@ static void init_sched_domain_sysctl(void)
5317 5322
5318 for (i = 0; i < cpu_num; i++, entry++) { 5323 for (i = 0; i < cpu_num; i++, entry++) {
5319 snprintf(buf, 32, "cpu%d", i); 5324 snprintf(buf, 32, "cpu%d", i);
5320 entry->ctl_name = i + 1;
5321 entry->procname = kstrdup(buf, GFP_KERNEL); 5325 entry->procname = kstrdup(buf, GFP_KERNEL);
5322 entry->mode = 0755; 5326 entry->mode = 0755;
5323 entry->child = sd_alloc_ctl_cpu_table(i); 5327 entry->child = sd_alloc_ctl_cpu_table(i);