highest and lowest priority job of a runqueue

2007-07-25 Thread Martin Roehricht
Hi, I have some questions concerning the current 2.6.22 scheduler implementation. I was wondering how I may retrieve (a) the priority/load of the highest and the lowest priority task of a runqueue (in a multiprocessor system), and (b) the corresponding pointer to this task? I thought I migh

Re: highest and lowest priority job of a runqueue

2007-07-25 Thread Martin Roehricht
On 07/25/2007 11:50 AM, Martin Roehricht wrote: I thought I might use (given a list with tmp pointers to all CPUs) rq = cpu_rq(tmp->cpu); task_load = rq->curr->load_weight; but this always returns 128 regardless of the fact if a task currently runs on that CPU or not. I

Re: Scheduling the highest priority task

2007-08-02 Thread Martin Roehricht
On 02.08.2007 21:48, Ingo Molnar wrote: * Martin Roehricht <[EMAIL PROTECTED]> wrote: On 08/02/2007 05:19 PM, Ingo Molnar wrote: >* Martin Roehricht <[EMAIL PROTECTED]> wrote: > >>That's fine with me, that within the same priority-queue any task can >>b

Scheduling the highest priority task

2007-08-02 Thread Martin Roehricht
Hi, perhaps someone can give me a hint what I should consider to look for in order to change the ("old" 2.6.21) scheduler such that it schedules the highest priority task of a given runqueue. Given a multiprocessor system I currently observe that whenever there are two tasks on one CPU, the lo

Re: Scheduling the highest priority task

2007-08-02 Thread Martin Roehricht
On 08/02/2007 01:40 PM, Ingo Molnar wrote: in the SMP migration code, the 'old scheduler' indeed picks the lowest priority one, _except_ if that task is running on another CPU or is too 'cache hot': But why is it, that the scheduler picks the lowest priority one? I thought sched_find_first_bi

Re: Scheduling the highest priority task

2007-08-02 Thread Martin Roehricht
On 08/02/2007 05:03 PM, Ingo Molnar wrote: * Martin Roehricht <[EMAIL PROTECTED]> wrote: On 08/02/2007 01:40 PM, Ingo Molnar wrote: >in the SMP migration code, the 'old scheduler' indeed picks the lowest >priority one, _except_ if that task is running on another CPU

Re: Scheduling the highest priority task

2007-08-02 Thread Martin Roehricht
On 08/02/2007 05:19 PM, Ingo Molnar wrote: * Martin Roehricht <[EMAIL PROTECTED]> wrote: That's fine with me, that within the same priority-queue any task can be chosen. But assume two tasks with highly different priorities, such as 105 and 135 are scheduled on the same processor