Re: [PATCH] Staircase Scheduler v6.3 for 2.6.7-rc2

William Lee Irwin III
2004-06-07T14:05:05Z

On Mon, Jun 07, 2004 at 06:57:38AM -0700, William Lee Irwin III wrote:
> JIFFIES_TO_NS() is unused.

array->nr_active only ever modified, never examined.

Index: kolivas-2.6.7-rc2/kernel/sched.c
===================================================================
--- kolivas-2.6.7-rc2.orig/kernel/sched.c 2004-06-07 06:53:26.779390000 -0700
+++ kolivas-2.6.7-rc2/kernel/sched.c 2004-06-07 07:03:00.910109000 -0700
@@ -92,7 +92,6 @@
typedef struct runqueue runqueue_t;

struct prio_array {
- unsigned int nr_active;
unsigned long bitmap[BITMAP_SIZE];
struct list_head queue[MAX_PRIO + 1];
};
@@ -204,7 +203,6 @@
static void dequeue_task(struct task_struct *p, runqueue_t *rq)
{
prio_array_t* array = &rq->array;
- array->nr_active--;
list_del(&p->run_list);
if (list_empty(array->queue + p->prio))
__clear_bit(p->prio, array->bitmap);
@@ -215,7 +213,6 @@
prio_array_t* array = &rq->array;
list_add_tail(&p->run_list, array->queue + p->prio);
__set_bit(p->prio, array->bitmap);
- array->nr_active++;
p->array = array;
}

@@ -229,7 +226,6 @@
prio_array_t* array = &rq->array;
list_add(&p->run_list, array->queue + p->prio);
__set_bit(p->prio, array->bitmap);
- array->nr_active++;
p->array = array;
}

@@ -1095,7 +1091,6 @@
p->prio = current->prio;
list_add_tail(&p->run_list, &current->run_list);
p->array = current->array;
- p->array->nr_active++;
rq->nr_running++;
}
} else {