DaemonEngine / Daemon

The Dæmon game engine. With some bits of ioq3 and XreaL.
https://unvanquished.net
BSD 3-Clause "New" or "Revised" License
296 stars 60 forks source link

Can we make synchronous IPC faster by doing a mixed shmem/pipe one? #1117

Open illwieckz opened 4 months ago

illwieckz commented 4 months ago

While working on #1114:

I noticed that message size of synchrnous IPC based trap calls have huge impact on performance.

I wonder if it would be possible to make such pipe speed totally independant from message size this way:

I guess the problem of synchronous IPC between game and engine using shmem is to actually synchronize the access, maybe we can only use the pipe for synchronizing the access, not for exchanging the actual data.

DolceTriade commented 4 months ago

I guess in theory it sounds faster, but I don't actually know whether such a thing will be faster in practice? Maybe we can avoid a kernel round trip by only using user space. Would need to be prototyped and benchmarked to be sure that this has a noticeable effect.