Index: linux-2.6.9-rc4/include/linux/sched.h
===================================================================
--- linux-2.6.9-rc4.orig/include/linux/sched.h	2004-10-14 09:10:18.054919808 +1000
+++ linux-2.6.9-rc4/include/linux/sched.h	2004-10-14 09:10:53.895471216 +1000
@@ -447,7 +447,7 @@ struct task_struct {
 	struct list_head run_list;
 
 	unsigned long long timestamp;
-	unsigned long runtime, totalrun;
+	unsigned long runtime, totalrun, ns_debit;
 	unsigned int burst;
 
 	unsigned long policy;
@@ -622,7 +622,6 @@ do { if (atomic_dec_and_test(&(tsk)->usa
 #define PF_FORKED	0x00400000	/* I have just forked */
 #define PF_YIELDED	0x00800000	/* I have just yielded */
 #define PF_UISLEEP	0x01000000	/* Uninterruptible sleep */
-#define PF_PREEMPT	0x02000000	/* I have been preempted */
 
 #ifdef CONFIG_SMP
 extern int set_cpus_allowed(task_t *p, cpumask_t new_mask);
Index: linux-2.6.9-rc4/kernel/sched.c
===================================================================
--- linux-2.6.9-rc4.orig/kernel/sched.c	2004-10-14 09:10:18.055919656 +1000
+++ linux-2.6.9-rc4/kernel/sched.c	2004-10-14 09:11:13.560481680 +1000
@@ -616,6 +616,7 @@ static void dequeue_task(struct task_str
 	list_del_init(&p->run_list);
 	if (list_empty(rq->queue + p->prio))
 		__clear_bit(p->prio, rq->bitmap);
+	p->ns_debit = 0;
 }
 
 static void enqueue_task(struct task_struct *p, runqueue_t *rq)
@@ -640,10 +641,7 @@ static void enqueue_task_head(struct tas
  */
 static void __activate_task(task_t *p, runqueue_t *rq)
 {
-	if (p->flags & PF_PREEMPT)
-		enqueue_task_head(p, rq);
-	else
-		enqueue_task(p, rq);
+	enqueue_task(p, rq);
 	rq->nr_running++;
 }
 
@@ -809,7 +807,6 @@ static void activate_task(task_t *p, run
 static void deactivate_task(struct task_struct *p, runqueue_t *rq)
 {
 	rq->nr_running--;
-	p->flags &= ~PF_PREEMPT;
 	if (p->state == TASK_UNINTERRUPTIBLE) {
 		p->flags |= PF_UISLEEP;
 		rq->nr_uninterruptible++;
@@ -2180,7 +2177,6 @@ static void time_slice_expired(task_t *p
 	dequeue_task(p, rq);
 	p->prio = effective_prio(p);
 	p->time_slice = RR_INTERVAL();
-	p->flags &= ~PF_PREEMPT;
 	enqueue_task(p, rq);
 }
 
@@ -2236,12 +2232,13 @@ void scheduler_tick(int user_ticks, int 
 	 */
 	if (unlikely(p->policy == SCHED_FIFO))
 		goto out;
-	debit = ns_diff(rq->timestamp_last_tick, p->timestamp);
-	if (debit < NSJIFFY / 2)
-		goto out;
 
 	spin_lock(&rq->lock);
-
+	debit = ns_diff(rq->timestamp_last_tick, p->timestamp);
+	p->ns_debit += debit;
+	if (p->ns_debit < NSJIFFY)
+		goto out_unlock;
+	p->ns_debit %= NSJIFFY;
 	/*
 	 * Tasks lose burst each time they use up a full slice().
 	 */
@@ -2398,6 +2395,7 @@ asmlinkage void __sched schedule(void)
 	runqueue_t *rq;
 	struct list_head *queue;
 	unsigned long long now;
+	unsigned long debit;
 	int cpu, idx;
 
 	/*
@@ -2432,6 +2430,8 @@ need_resched:
 
 	spin_lock_irq(&rq->lock);
 	prev->runtime = ns_diff(now, prev->timestamp);
+	debit = ns_diff(now, rq->timestamp_last_tick) % NSJIFFY;
+	prev->ns_debit += debit;
 
 	/*
 	 * if entering off of a kernel preemption go straight
@@ -2505,7 +2505,6 @@ switch_tasks:
 		rq->preempted = 0;
 		rq->cache_ticks = 0;
 		next->timestamp = now;
-		next->flags |= PF_PREEMPT;
 		rq->nr_switches++;
 		rq->curr = next;
 		++*switch_count;
@@ -3244,7 +3243,6 @@ asmlinkage long sys_sched_yield(void)
 		current->flags |= PF_YIELDED;
 		current->prio = MAX_PRIO - 1;
 	}
-	current->flags &= ~PF_PREEMPT;
 	enqueue_task(current, rq);
 
 	/*
