fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / kernel / vserver / sched_init.h
1
2 static inline void vx_info_init_sched(struct _vx_sched *sched)
3 {
4         static struct lock_class_key tokens_lock_key;
5
6         /* scheduling; hard code starting values as constants */
7         sched->fill_rate[0]     = 1;
8         sched->interval[0]      = 4;
9         sched->fill_rate[1]     = 1;
10         sched->interval[1]      = 8;
11         sched->tokens           = HZ >> 2;
12         sched->tokens_min       = HZ >> 4;
13         sched->tokens_max       = HZ >> 1;
14         sched->tokens_lock      = SPIN_LOCK_UNLOCKED;
15         sched->prio_bias        = 0;
16
17         lockdep_set_class(&sched->tokens_lock, &tokens_lock_key);
18 }
19
20 static inline
21 void vx_info_init_sched_pc(struct _vx_sched_pc *sched_pc, int cpu)
22 {
23         sched_pc->fill_rate[0]  = 1;
24         sched_pc->interval[0]   = 4;
25         sched_pc->fill_rate[1]  = 1;
26         sched_pc->interval[1]   = 8;
27         sched_pc->tokens        = HZ >> 2;
28         sched_pc->tokens_min    = HZ >> 4;
29         sched_pc->tokens_max    = HZ >> 1;
30         sched_pc->prio_bias     = 0;
31         sched_pc->vavavoom      = 0;
32         sched_pc->token_time    = 0;
33         sched_pc->idle_time     = 0;
34         sched_pc->norm_time     = jiffies;
35
36         sched_pc->user_ticks = 0;
37         sched_pc->sys_ticks = 0;
38         sched_pc->hold_ticks = 0;
39 }
40
41 static inline void vx_info_exit_sched(struct _vx_sched *sched)
42 {
43         return;
44 }
45
46 static inline
47 void vx_info_exit_sched_pc(struct _vx_sched_pc *sched_pc, int cpu)
48 {
49         return;
50 }