1 diff -Nurp linux-2.6.22-620/fs/proc/proc_misc.c linux-2.6.22-630/fs/proc/proc_misc.c
2 --- linux-2.6.22-620/fs/proc/proc_misc.c 2008-06-25 14:49:41.000000000 -0400
3 +++ linux-2.6.22-630/fs/proc/proc_misc.c 2008-07-08 16:12:39.000000000 -0400
4 @@ -779,6 +779,34 @@ static const struct file_operations proc
8 +extern char debug_630_dumped[4087];
9 +static int show_debug_630(struct seq_file *p, void *v)
11 + seq_printf(p, "%s\n", debug_630_dumped);
15 +static int debug_630_open(struct inode *inode, struct file *filp)
20 + res = single_open(filp, show_debug_630, NULL);
22 + m = filp->private_data;
23 + m->buf = kmalloc(4096, GFP_KERNEL);
29 +static const struct file_operations proc_debug_630_operations = {
30 + .open = debug_630_open,
32 + .llseek = seq_lseek,
33 + .release = single_release,
36 struct proc_dir_entry *proc_root_kcore;
38 void create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
39 @@ -871,4 +899,6 @@ void __init proc_misc_init(void)
40 entry->proc_fops = &proc_sysrq_trigger_operations;
44 + create_seq_entry("debug_630", 0, &proc_debug_630_operations);
46 diff -Nurp linux-2.6.22-620/kernel/sched.c linux-2.6.22-630/kernel/sched.c
47 --- linux-2.6.22-620/kernel/sched.c 2008-06-25 14:49:41.000000000 -0400
48 +++ linux-2.6.22-630/kernel/sched.c 2008-07-07 16:29:49.000000000 -0400
49 @@ -3635,6 +3635,12 @@ struct event_spec {
53 +/* Bypass the vx_unhold infinite loop */
55 +char debug_630_dumped[4087] = { [0] = '\0' };
56 +EXPORT_SYMBOL(merry);
57 +EXPORT_SYMBOL(debug_630_dumped);
59 asmlinkage void __sched schedule(void)
61 struct task_struct *prev, *next;
62 @@ -3722,14 +3728,43 @@ need_resched_nonpreemptible:
64 cpu = smp_processor_id();
65 vx_set_rq_time(rq, jiffies);
69 vx_try_unhold(rq, cpu);
72 if (unlikely(!rq->nr_running)) {
73 /* can we skip idle time? */
74 - if (vx_try_skip(rq, cpu))
75 + if (vx_try_skip(rq, cpu) && merry<10) {
79 + else if (merry==10 && !*debug_630_dumped) {
80 + char *ptr = debug_630_dumped;
81 +#define append(...) ptr += snprintf(ptr, ((debug_630_dumped + sizeof(debug_630_dumped)) - ptr), __VA_ARGS__)
83 + if (list_empty(&rq->hold_queue))
84 + append("hold queue is empty\n");
86 + struct list_head *l, *n;
87 + append("rq->norm_time = %lu, rq->idle_time = %lu, rq->idle_skip = %d\n",
88 + rq->norm_time, rq->idle_time, rq->idle_skip);
89 + list_for_each_safe(l, n, &rq->hold_queue) {
90 + struct task_struct *p;
91 + struct _vx_sched_pc *sched_pc;
92 + struct vx_info *vxi;
94 + p = list_entry(l, struct task_struct, run_list);
96 + sched_pc = &vx_per_cpu(vxi, sched_pc, cpu);
98 + append("%u: sched_pc->norm_time = %lu, sched_pc->idle_time = %lu\n", vxi->vx_id,
99 + sched_pc->norm_time, sched_pc->idle_time);
105 idle_balance(cpu, rq);
106 if (!rq->nr_running) {