diff options
| author | Ingo Molnar <mingo@elte.hu> | 2002-07-23 22:17:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-07-23 22:17:36 -0700 |
| commit | 97db62cc99a0d92650fbf23b7fbc034107eb01f3 (patch) | |
| tree | a708e1efa64cb8020b108b949857358e0a1cf19b /include/linux | |
| parent | 9e7cec8858f964d3be10e2f703c841cf05871e09 (diff) | |
[PATCH] scheduler fixes
- introduce new type of context-switch locking, this is a must-have for
ia64 and sparc64.
- load_balance() bug noticed by Scott Rhine and myself: scan the
whole list to find imbalance number of tasks, not just the tail
of the list.
- sched_yield() fix: use current->array not rq->active.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/init_task.h | 3 | ||||
| -rw-r--r-- | include/linux/sched.h | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 4fcbad0862b8..56c6b7181796 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -47,7 +47,7 @@ lock_depth: -1, \ prio: MAX_PRIO-20, \ static_prio: MAX_PRIO-20, \ - policy: SCHED_OTHER, \ + policy: SCHED_NORMAL, \ cpus_allowed: -1, \ mm: NULL, \ active_mm: &init_mm, \ @@ -78,6 +78,7 @@ pending: { NULL, &tsk.pending.head, {{0}}}, \ blocked: {{0}}, \ alloc_lock: SPIN_LOCK_UNLOCKED, \ + switch_lock: SPIN_LOCK_UNLOCKED, \ journal_info: NULL, \ } diff --git a/include/linux/sched.h b/include/linux/sched.h index 004d2a129ca4..6dd4746e58cd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -116,7 +116,7 @@ extern unsigned long nr_uninterruptible(void); /* * Scheduling policies */ -#define SCHED_OTHER 0 +#define SCHED_NORMAL 0 #define SCHED_FIFO 1 #define SCHED_RR 2 @@ -207,7 +207,7 @@ struct signal_struct { /* * Priority of a process goes from 0..MAX_PRIO-1, valid RT - * priority is 0..MAX_RT_PRIO-1, and SCHED_OTHER tasks are + * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values * are inverted: lower p->prio value means higher priority. * @@ -264,7 +264,7 @@ struct task_struct { unsigned long policy; unsigned long cpus_allowed; - unsigned int time_slice; + unsigned int time_slice, first_time_slice; struct list_head tasks; @@ -361,6 +361,8 @@ struct task_struct { u32 self_exec_id; /* Protection of (de-)allocation: mm, files, fs, tty */ spinlock_t alloc_lock; +/* context-switch lock */ + spinlock_t switch_lock; /* journalling filesystem info */ void *journal_info; |
