Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / kernel / vserver / sched_init.h
1
2 static inline void vx_info_init_sched(struct _vx_sched *sched)
3 {
4         int i;
5
6         /* scheduling; hard code starting values as constants */
7         sched->fill_rate        = 1;
8         sched->interval         = 4;
9         sched->tokens_min       = HZ >> 4;
10         sched->tokens_max       = HZ >> 1;
11         sched->jiffies          = jiffies;
12         sched->tokens_lock      = SPIN_LOCK_UNLOCKED;
13
14 #ifdef CONFIG_VSERVER_ACB_SCHED
15         /* We can't set the "real" token count here because we don't have
16          * access to the vx_info struct.  Do it later... */
17         for (i = 0; i < SCH_NUM_CLASSES; i++) {
18             sched->state[i] = SCH_UNINITIALIZED;
19         }
20 #endif
21
22         atomic_set(&sched->tokens, HZ >> 2);
23         sched->cpus_allowed     = CPU_MASK_ALL;
24         sched->priority_bias    = 0;
25         sched->vavavoom         = 0;
26
27         for_each_cpu(i) {
28                 sched->cpu[i].user_ticks        = 0;
29                 sched->cpu[i].sys_ticks         = 0;
30                 sched->cpu[i].hold_ticks        = 0;
31         }
32 }
33
34 static inline void vx_info_exit_sched(struct _vx_sched *sched)
35 {
36         return;
37 }
38