Hacker News new | ask | show | jobs
by goodplay 3259 days ago
I always found this peculiar about linux; even when the system is swapping hard and application windows/window managers completely freeze, the cursor always remains responsive and movement rendered without so much as a hitch.

I wonder if xorg has some sort of kernel support to enable this.

2 comments

Not on my computer. Something like a WM will freeze while it waits in queue to read those 0.2kB it needs of the disk (poor software design, if you ask me). But the mouse will freeze when IO buffers get filled. Just writing a huge file to a (slow-ish) usb stick will make my whole computer freeze, including the mouse, because the kernel usb code doesn't limit the buffer to some sane size (there was a kernel patch, and there is an option, and even with it turned on the problem is still there) (note that the probable reasoning for that is the fact that usb sucks).

A mouse cursor, AFAIK, is a gpu thing, not that it matters (wayland, i remember something that, will use normal gpu rendering to render the mouse). In the UNIX haters handbook there is a section about X where it is written that displays used to have 2-3 planes (IIRC, 2 planes + a cursor plane. I do recommend reading the good book, as it is funny).

I remember some talk about better kernel buffers management just for things like this. Memory management in the kernel is one of those actually hard things.

Xorg used to get SIGIO on input; it's now less responsive and uses threads: http://who-t.blogspot.com/2016/09/input-threads-in-x-server....