2005/9/1, jmerkey <[email protected]>:
> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|