[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-smp
Subject:    Re: SMP performance test puzzle
From:       Ugama <ugama () insycom ! net>
Date:       2003-02-24 20:52:29
[Download RAW message or body]


> Le dim 23/02/2003 à 04:29, Ugama a écrit :
>
> May be we should look at something more simple:
>
> 	the 'rand' function is not REENTRANT and
> does not support multiple thread calls and then sequentialize
> (somewhere) all the calls.
> 	So that all the simultaneous thread are competing
> for 'rand' call.

>
> 	Try the version attached which does not call rand,
> it works for me with expected scalable results....
>
>
> 	I use 2.4.20 stock kernel
>
> 	and
>
> 	g++ -o timing -O3 -D_REENTRANT -lpthread ugama.cpp
Tnahks. This is it!
I've removed rand() and everything become "real-looking" :)
Could not even expect such behaviour from rand(). :(
I still have similar problem in my app, but the problem must has the same 
nature. 

Just for the record. In this particular test the dirrective _REENTRANT does 
not have visible influence. But any way your right to follow recomendation 
from Leroy.

One more time great thanks for your help. I realy appreciate that .. you can 
not event imagine how much!  

Ugama

-
To unsubscribe from this list: send the line "unsubscribe linux-smp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic