[this message is also send to comp.os.linux.development.system]

Hello,
I have written a filesystem handling video files using userfs-0.9.4.2 on
linux kernel v2.0.35.
It works, but it is to slow. I would like to increase the performance
by reducing the number of context switches necessary for read and write.
The userfs design uses a pipe to transport data between the vfs layer
and
the userlevel filesystem server process. This results in moving megabyte
sized video files in 4k blocks, with two context switches for every
block.

I would like to transport the mass data (file contens) through shared
memory between the kernel, and the userlevel file system server.
How to do this?

I have would perfer to use the buffers in the userlevel process, which
will be swapped, if not in use.

I have read into "Linux Device Drivers" and "Linux Kernel
Programmierung",
but still don't know how to do it. What I have fond up to now is:

I can copy to / from userspace using memcpy_fromfs() / memcpy_tofs().
(copy_from_user() / copy_to_user() for 2.1).
But I can't give an identifier to these functions, which describes
the process, I want it to work on.
There are get_fs() / set_fs() with which I might be able to direct the
above functions to the correct user address space. The problem is, that
I don't know the address space identifier of the server process.


  Application     ----->  vfs / userfs    ----->  file server process
  user mode       read()  kernel mode             user mode
  client context  file    client context  pipe    server context
                                          shared
                                          memory?


Using a kernel buffer and opening /dev/mem as a file, or mapping it
wouldn't be that good an idea, as I would still get a lot of context
switches, or, at least fileserver / kernel switches.

coda uses files in some local directory to pass read/write data to
the application. I am not very keen on this.
PerlFS uses it's own character device to pass the data. It would be
possible to increase it's buffer from 4k to something reasonable for
video files like .5M, but I am also not very keen on completely
restructuring userfs.


Ideas?


                                Tschuess
                                        Andreas

-- 
 /|)    Andreas Buschmann                       <[EMAIL PROTECTED]>
/-|)    Digitale Video Systeme                  +49 511 678 07-13
        DVS GmbH

Reply via email to