Hi, I've been looking at the following trace: | cyclicte-526 0d...2.. 6876070 603us : finish_task_switch <-__schedule | cyclicte-526 0....2.. 6876070 605us : preempt_count_sub <-finish_task_switch | cyclicte-526 0....1.. 6876070 607us : preempt_count_sub <-schedule | cyclicte-526 0....... 6876070 610us : finish_wait <-put_and_wait_on_page_locked I see put_and_wait_on_page_locked after schedule and didn't expect that. cyclictest then blocks on a lock and switches to `kcompact'. Once it finishes, it switches back to cyclictest: | cyclicte-526 0....... 6876070 853us : rt_spin_unlock <-put_and_wait_on_page_locked | cyclicte-526 0....... 6876070 854us : migrate_enable <-rt_spin_unlock | cyclicte-526 0....... 6876070 860us : up_read <-do_page_fault | cyclicte-526 0....... 6876070 861us : __up_read <-do_page_fault | cyclicte-526 0d...... 6876070 867us : do_PrefetchAbort <-ret_from_exception | cyclicte-526 0d...... 6876070 868us : do_page_fault <-do_PrefetchAbort | cyclicte-526 0....... 6876070 870us : down_read_trylock <-do_page_fault | cyclicte-526 0....... 6876070 872us : __down_read_trylock <-do_page_fault … | cyclicte-526 0....... 6876070 914us : __up_read <-do_page_fault | cyclicte-526 0....... 6876070 923us : sys_clock_gettime32 <-ret_fast_syscall | cyclicte-526 0....... 6876070 925us : posix_ktime_get_ts <-sys_clock_gettime32 I did not expect a pagefault with mlockall(). I assume it has to do with memory compaction. I have | CONFIG_COMPACTION=y | CONFIG_MIGRATION=y and Kconfig says: |config COMPACTION … | You shouldn't | disable this option unless there really is a strong reason for | it and then we would be really interested to hear about that at | linux-mm@xxxxxxxxx. Shouldn't COMPACTION avoid touching/moving mlock()ed pages? Sebastian