mmap smp problem ?

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Tue, 23 Nov 1999 17:53:37 +0100 (CET)


On 23-Nov-99 J-F Mammet wrote:
> HI everybody.
> 
> I'm new on this list but I have read most of the recent archive. I saw 
> there is a mmap problem. Is it only with SMP ? I just crashed my machine
> at 
> home (damn !) trying to use laucch camserv on my dual celeron. I did not
> see the mmap calls in a file.

There is some warning in the README that mmap on SMP is a killer. Normal
read operation, e.g. the gqcam-application, should work fine. Can you
check that?

> Is a fix in the way. I just saw 0.4.2 but I did not see any mmap related
> change in the patch.

Correct, there is no change.

> If I recompile my kernels/modules with SMP disabled, will it work ok ?

Yes and no. The mmap stuff was never working too well. However, I will
release a 'working' version as soon as possible.

The mmap-stuff was implemented as a asynchronous 'pseudo kernel-thread'.
To make that stuff really working stable it has to be implemented as a
real kernel thread so one can also schedule it reasonably in case of
polling. Also to make it smp-save one has to serialize the stuff with
wait-queues and the like. All in all that is a major rewrite that needs
quite some thinking first. So I made the decision to implement mmap
synchronous just as the normal read (I do have that at home, it just needs
some cleanups). This will go to the first real beta-release that we should
try to add to the 2.2.X kernel series sooner later.

The drawbacks of this synchronous mmap-stuff:
- no interrupt driven operation possible
- therefore USB pointless
- no gain whatsoever on SMP-hosts
- maybe slower frame rate due to unneccessary waits

Still I think this will be usefull enough for most of the normal users.  
After that I will rewrite the mmap-stuff to get some real practice with
parallel kernel threads and SMP-machines. :)

-Peter


-------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
WWW:   http://www.risc.uni-linz.ac.at/people/ppregler
-----------------------------------------------------------------------------
To unsubscribe from this mailinglist, send the line "unsubscribe vision-webcam" in the
body of a message to "majordomo@errors.no".