Shared mem for kio streaming?

Koos Vriezen koos.vriezen at xs4all.nl
Sun Oct 5 22:40:57 BST 2003


hi,

After reading a thread on lkml recently about zero copy ipc and the
suggestion that futex + /dev/shm or futex + clone would be the way to do
it, I started playing with this idea (installed severn on a spare
partition and after upgrading gcc from rawhide I can actually build and
run kde from CVS :).
Anyway, a working ipc attached (got the docu from
http://vireo.gatech.edu/library/SGI_bookshelves/SGI_Developer/books/T_IRIX_Prog/sgi_html/
) and it actually works. However probably some shared mmap version of
malloc, would make this example really usefull.

But, where this mail is about, is about streaming with kio. Currently kjas
can make use of kio for network loading. Data comes from the
'data( KIO::Job*, const QByteArray& )' signal and is then piped to the jvm
stdin and copied in a byte array.
At first I tried to build a shared JNI lib, but kio libs are no good for
non-kde apps. An additional stream (eg. unix socket - note for non-java
knowers, java doesn't support unix sockets because ms doesn't support it
arrgg) would be needed.
Now with shm, I think it would be possible. And of course using shm, eg
using a ring of buffers, kio would be a great for streaming too.

This is only a rough idea and not yet supported by most distro's until
2.6 is ready, but how does it sound :-) ?

Koos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shm_client.c.gz
Type: application/x-gunzip
Size: 928 bytes
Desc: 
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031005/90c923b0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shm_server.c.gz
Type: application/x-gunzip
Size: 1118 bytes
Desc: 
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031005/90c923b0/attachment-0001.bin>


More information about the kfm-devel mailing list