linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NUMA scheduler broken
@ 2003-03-07  8:30 Martin J. Bligh
  2003-03-07 11:51 ` Rick Lindsley
  0 siblings, 1 reply; 4+ messages in thread
From: Martin J. Bligh @ 2003-03-07  8:30 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, ricklind; +Cc: linux-kernel

Something in current -bk breaks the NUMA scheduler.

Kernbench: (make -j N vmlinux, where N = 16 x num_cpus)
                              Elapsed      System        User         CPU
             2.5.64-align       46.29      129.38      567.02     1504.75
                2.5.64-bk      153.04       49.05      558.30      395.00

Looks like it's not node-balancing at all and just using one node.
However, I spent a few minutes looking, and can't see anything obvious
that would have caused it.

Will look at it some more tommorow when I wake up, but if any of you
can see what's broken of the top of your head ...

M.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NUMA scheduler broken
  2003-03-07  8:30 NUMA scheduler broken Martin J. Bligh
@ 2003-03-07 11:51 ` Rick Lindsley
  2003-03-07 12:41   ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Lindsley @ 2003-03-07 11:51 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Linus Torvalds, Ingo Molnar, linux-kernel

Looks like __activate_task() should call nr_running_inc(rq) rather than
rq->nr_running++, and the same in wake_up_forked_process().  My guess
is that the bogus node_nr_running value is causing some really poor
scheduling decisions to be made on NUMA.  See if that changes your result.

Rick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NUMA scheduler broken
  2003-03-07 11:51 ` Rick Lindsley
@ 2003-03-07 12:41   ` Ingo Molnar
  2003-03-07 16:24     ` Martin J. Bligh
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2003-03-07 12:41 UTC (permalink / raw)
  To: Rick Lindsley; +Cc: Martin J. Bligh, Linus Torvalds, linux-kernel


On Fri, 7 Mar 2003, Rick Lindsley wrote:

> Looks like __activate_task() should call nr_running_inc(rq) rather than
> rq->nr_running++, and the same in wake_up_forked_process().  My guess is
> that the bogus node_nr_running value is causing some really poor
> scheduling decisions to be made on NUMA.  See if that changes your
> result.

indeed. The attached patch (against BK-curr) fixes this.

	Ingo

--- kernel/sched.c.orig	2003-03-07 13:40:53.000000000 +0100
+++ kernel/sched.c	2003-03-07 13:41:19.000000000 +0100
@@ -325,7 +325,7 @@
 static inline void __activate_task(task_t *p, runqueue_t *rq)
 {
 	enqueue_task(p, rq->active);
-	rq->nr_running++;
+	nr_running_inc(rq);
 }
 
 static inline void activate_task(task_t *p, runqueue_t *rq)
@@ -545,7 +545,7 @@
 		list_add_tail(&p->run_list, &current->run_list);
 		p->array = current->array;
 		p->array->nr_active++;
-		rq->nr_running++;
+		nr_running_inc(rq);
 	}
 	task_rq_unlock(rq, &flags);
 }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NUMA scheduler broken
  2003-03-07 12:41   ` Ingo Molnar
@ 2003-03-07 16:24     ` Martin J. Bligh
  0 siblings, 0 replies; 4+ messages in thread
From: Martin J. Bligh @ 2003-03-07 16:24 UTC (permalink / raw)
  To: Ingo Molnar, Rick Lindsley; +Cc: Linus Torvalds, linux-kernel

>> Looks like __activate_task() should call nr_running_inc(rq) rather than
>> rq->nr_running++, and the same in wake_up_forked_process().  My guess is
>> that the bogus node_nr_running value is causing some really poor
>> scheduling decisions to be made on NUMA.  See if that changes your
>> result.

Yay! that fixes it. Nice catch Rick.

> indeed. The attached patch (against BK-curr) fixes this.

Thanks Ingo ... Linus, could you add that one?

Thanks,

M.
 
> 	Ingo
> 
> --- kernel/sched.c.orig	2003-03-07 13:40:53.000000000 +0100
> +++ kernel/sched.c	2003-03-07 13:41:19.000000000 +0100
> @@ -325,7 +325,7 @@
>  static inline void __activate_task(task_t *p, runqueue_t *rq)
>  {
>  	enqueue_task(p, rq->active);
> -	rq->nr_running++;
> +	nr_running_inc(rq);
>  }
>  
>  static inline void activate_task(task_t *p, runqueue_t *rq)
> @@ -545,7 +545,7 @@
>  		list_add_tail(&p->run_list, &current->run_list);
>  		p->array = current->array;
>  		p->array->nr_active++;
> -		rq->nr_running++;
> +		nr_running_inc(rq);
>  	}
>  	task_rq_unlock(rq, &flags);
>  }
> 
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-07 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07  8:30 NUMA scheduler broken Martin J. Bligh
2003-03-07 11:51 ` Rick Lindsley
2003-03-07 12:41   ` Ingo Molnar
2003-03-07 16:24     ` Martin J. Bligh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).