lkml.org 
[lkml]   [2005]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANNOUNCE] DSFS Network Forensic File System for Linux Patches
2005/9/1, jmerkey <jmerkey@utah-nac.org>:
> 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;
> + }
> }
>

I think a BUG_ON(!array) should be there to cache the call trace. I
think there are bugs on the call trace. The codes you add will only
resolve the problem in an exterior way.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-01 05:22    [from the cache]
©2003-2011 Jasper Spaans