kernel level window management

Dimitri Nüscheler dimitri.nuescheler at sunrise.ch
Tue Dec 29 10:09:27 PST 2015


Hello everyone

I sometimes wonder where people talk about concept level and philosophy.
At least Wayland has a big philosophy part - and it uses it to explain 
itself in contrast to X.
I'm not much involved into it, but I think I understand some vital parts.
So far I understand it as a "graphics buffer and input redirection 
protocol" and that's a very concept level perspective. The routers in 
this "redirection network" are obviously the compositors.

Now semantically I would never want to change that philosophy, but what 
I reflect on is if the protocol or implementation could optimize some 
redirections away.

Think like a programming language compiler which optimizes away the 
semantics.
It's nice to have certain functions separated for code readability, but 
at runtime it doesn't matter so the compiler might inline some functions.

There are constraints on that such as when the function is public API 
and similarly there would be constraints on optimizing away redirection 
in Wayland.

To some extent Wayland compositors already do some unredirection tricks. 
They can declare buffers as scanout buffers which have their own kms 
plane and that avoids a buffer copy. (It's a bit like DMA).

I would actually like to discuss taking this just one step further. Make 
the compositor bail out completely for a longer period in time (multiple 
frames) by enabling clients to access a secured screen region directly. 
This would avoid per-frame context-switches in certain situations where 
the redirection would basically be something like an "identity function" 
if you know what I mean.

I tried to better explain it here 
http://repository.violetsky.ch/other/demediation/window-manager-demediation.html 
and it basically results in a very primitive form of kernel level window 
management that is controlled by the (Wayland) compositor.

I created this in response to a blog post of Martin Grässlin, but I was 
unheard by the crowd - so maybe this is the better address here.

Not sure if that would ever be needed since context switches are just a 
few microseconds, but still with virtual reality we might go towards 
1000-10000 fps so it could start to matter at some point. Eh?

Thanks & Kind Regards

Dimitri


More information about the wayland-devel mailing list