Xorg swapping: bug or expected?

Francois rigault.francois+coreutils at gmail.com
Mon Jan 11 14:37:40 PST 2016

Hi Xorg,

during experimentation with dd, Xorg started being unresponsive. In
fact, as soon as swapping kicks off, the system becomes hardly usable:
mouse does not move or "jumps", window do not get displayed,...

Doing ps, Xorg starts to go into uninterruptible sleep:
    STAT   PID CMD                         WCHAN
    Ds+    692 /usr/lib/xorg/Xorg -core :0 wait_on_page_bit_killable

This is the content of /proc/692/stack when it happens:
    [<ffffffff81186add>] wait_on_page_bit_killable+0xcd/0xf0
    [<ffffffff81186b84>] __lock_page_or_retry+0x84/0xa0
    [<ffffffff811b7950>] handle_mm_fault+0xfb0/0x17b0
    [<ffffffff81068257>] __do_page_fault+0x197/0x400
    [<ffffffff810684e2>] do_page_fault+0x22/0x30
    [<ffffffff817fdbf8>] page_fault+0x28/0x30
    [<ffffffffffffffff>] 0xffffffffffffffff

We can also count the page faults experienced by Xorg, as I have tried to
do: https://lists.gnu.org/archive/html/coreutils/2016-01/msg00027.html

My question is: is this normal? Do we expect Xorg to swap like any other
program, or does Xorg (should) mlock some of the memory it uses to avoid
swapping? Do you think there is anything else to investigate, or is this
just working as designed?

Thanks a lot!

More information about the xorg mailing list