Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69011
b: refs/heads/master
c: 2bd8e6d
h: refs/heads/master
i:
  69009: 3baaa69
  69007: 0a0ee01
v: v3
  • Loading branch information
Ingo Molnar committed Oct 15, 2007
1 parent b0cdec8 commit e9a2921
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 38ad464d410dadceda1563f36bdb0be7fe4c8938
refs/heads/master: 2bd8e6d422a4f44c0994f909317eba80b0fe08a1
5 changes: 4 additions & 1 deletion trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1402,15 +1402,18 @@ static inline void idle_task_exit(void) {}

extern void sched_idle_next(void);

#ifdef CONFIG_SCHED_DEBUG
extern unsigned int sysctl_sched_latency;
extern unsigned int sysctl_sched_min_granularity;
extern unsigned int sysctl_sched_wakeup_granularity;
extern unsigned int sysctl_sched_batch_wakeup_granularity;
extern unsigned int sysctl_sched_stat_granularity;
extern unsigned int sysctl_sched_runtime_limit;
extern unsigned int sysctl_sched_compat_yield;
extern unsigned int sysctl_sched_child_runs_first;
extern unsigned int sysctl_sched_features;
#endif

extern unsigned int sysctl_sched_compat_yield;

#ifdef CONFIG_RT_MUTEXES
extern int rt_mutex_getprio(struct task_struct *p);
Expand Down
6 changes: 0 additions & 6 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,12 +1658,6 @@ void sched_fork(struct task_struct *p, int clone_flags)
put_cpu();
}

/*
* After fork, child runs first. (default) If set to 0 then
* parent will (try to) run first.
*/
unsigned int __read_mostly sysctl_sched_child_runs_first = 1;

/*
* wake_up_new_task - wake up a newly created task for the first time.
*
Expand Down
28 changes: 20 additions & 8 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
* Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
*/

/*
* Tunables that become constants when CONFIG_SCHED_DEBUG is off:
*/
#ifdef CONFIG_SCHED_DEBUG
# define const_debug __read_mostly
#else
# define const_debug static const
#endif

/*
* Targeted preemption latency for CPU-bound tasks:
* (default: 20ms, units: nanoseconds)
Expand All @@ -34,7 +43,13 @@
* systems, 4x on 8-way systems, 5x on 16-way systems, etc.)
* Targeted preemption latency for CPU-bound tasks:
*/
unsigned int sysctl_sched_latency __read_mostly = 20000000ULL;
const_debug unsigned int sysctl_sched_latency = 20000000ULL;

/*
* After fork, child runs first. (default) If set to 0 then
* parent will (try to) run first.
*/
const_debug unsigned int sysctl_sched_child_runs_first = 1;

/*
* Minimal preemption granularity for CPU-bound tasks:
Expand All @@ -58,7 +73,7 @@ unsigned int __read_mostly sysctl_sched_compat_yield;
* and reduces their over-scheduling. Synchronous workloads will still
* have immediate wakeup/sleep latencies.
*/
unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly = 25000000UL;
const_debug unsigned int sysctl_sched_batch_wakeup_granularity = 25000000UL;

/*
* SCHED_OTHER wake-up granularity.
Expand All @@ -68,13 +83,10 @@ unsigned int sysctl_sched_batch_wakeup_granularity __read_mostly = 25000000UL;
* and reduces their over-scheduling. Synchronous workloads will still
* have immediate wakeup/sleep latencies.
*/
unsigned int sysctl_sched_wakeup_granularity __read_mostly = 1000000UL;
const_debug unsigned int sysctl_sched_wakeup_granularity = 1000000UL;

unsigned int sysctl_sched_stat_granularity __read_mostly;
const_debug unsigned int sysctl_sched_stat_granularity;

/*
* Initialized in sched_init_granularity() [to 5 times the base granularity]:
*/
unsigned int sysctl_sched_runtime_limit __read_mostly;

/*
Expand All @@ -89,7 +101,7 @@ enum {
SCHED_FEAT_SKIP_INITIAL = 32,
};

unsigned int sysctl_sched_features __read_mostly =
const_debug unsigned int sysctl_sched_features =
SCHED_FEAT_FAIR_SLEEPERS *1 |
SCHED_FEAT_SLEEPER_AVG *0 |
SCHED_FEAT_SLEEPER_LOAD_AVG *1 |
Expand Down

0 comments on commit e9a2921

Please sign in to comment.