Re: 2.0.x SMP performances compared to 2.1.x

Linus Torvalds (torvalds@transmeta.com)
28 Aug 1998 18:34:24 GMT


In article <tliujeksot.fsf@pcq05.cae.ca>,
Claude Gamache <cgamache@cae.ca> wrote:
>
>Our question is about performance of kernels 2.0.x compared to 2.1.x
>kernels.
>
>Our application is built with egcs 1.0.3 and is made up of 10
>processes sharing information through shared memories (up to 10
>maximum). In order to avoid racing situations among the processes we
>use sigaction() and setitimer() to schedule each process execution,
>and some of the processes have a priority of +19. So when a process
>has finished its computation it gently waits in the pause() function,
>requiring almost no CPU time at all. The computations are arranged in
>a pipeline going from one process to the next. When one process does
>not have any new data, it simply goes directly to the pause() function
>in order to be nice to the other processes.

You should really make sure it does a "sched_yield()" instead of
pause().

Doing a pause() will force a re-schedule, but there is no guarantee that
it will actually schedule anything else: the kernel may well decide that
the pausing process is still a good process to use.

If using the proper sched_yield() doesn't fix it for you, I'd really
need to see the binary or something in order to tell you what's wrong.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html