Re: [ANNOUNCE] DSFS Network Forensic File System for Linux Patches

From: jmerkey
Date: Wed Aug 31 2005 - 21:59:53 EST


Bernd,

It might be helpful for someone to look at these sections of code I had to patch in 2.6.9.
I discovered a case where the kernel scheduler will pass NULL for the array argument
when I started hitting the extreme upper range > 200MB/S combined disk and lan
throughput. This was running with preemptible kernel and hyperthreading enabled.

The wheels come off in the kernel somewhere. I looked at later 2.6 kernels and there's
been some changes, but someone may get an ah ha from this fix, if there is an underlying
problem in the kernel.

Jeff


static void dequeue_task(struct task_struct *p, prio_array_t *array)
{
- array->nr_active--;
- list_del(&p->run_list);
- if (list_empty(array->queue + p->prio))
- __clear_bit(p->prio, array->bitmap);
+ if (!array)
+ printk("WARN: prio_array was NULL in dequeue task %08X"
+ "pid-%d\n", (unsigned)p, (int)p->pid);
+
+ if (array)
+ {
+ array->nr_active--;
+ list_del(&p->run_list);
+ if (list_empty(array->queue + p->prio))
+ __clear_bit(p->prio, array->bitmap);
+ }
}


static void deactivate_task(struct task_struct *p, runqueue_t *rq)
{
- rq->nr_running--;
- if (p->state == TASK_UNINTERRUPTIBLE)
- rq->nr_uninterruptible++;
- dequeue_task(p, p->array);
- p->array = NULL;
+ if (!p->array)
+ printk("WARN: prio_array was NULL in deactivate task %08X"
+ "pid-%d\n", (unsigned)p, (int)p->pid);
+
+ if (p->array)
+ {
+ rq->nr_running--;
+ if (p->state == TASK_UNINTERRUPTIBLE)
+ rq->nr_uninterruptible++;
+ dequeue_task(p, p->array);
+ p->array = NULL;
+ }
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/