linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Memory compaction and mlockall()
@ 2019-07-10 14:41 Sebastian Andrzej Siewior
  2019-07-10 16:20 ` Dave Hansen
  2019-07-10 18:21 ` Yang Shi
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-07-10 14:41 UTC (permalink / raw)
  To: linux-mm; +Cc: tglx

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@kvack.org.

Shouldn't COMPACTION avoid touching/moving mlock()ed pages?

Sebastian


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-13  8:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 14:41 Memory compaction and mlockall() Sebastian Andrzej Siewior
2019-07-10 16:20 ` Dave Hansen
2019-07-10 16:45   ` Sebastian Andrzej Siewior
2019-07-10 17:02     ` Dave Hansen
2019-07-10 18:21 ` Yang Shi
2019-07-11  9:43   ` Sebastian Andrzej Siewior
2019-07-11 16:23     ` Yang Shi
2019-08-12 14:59     ` Vlastimil Babka
2019-08-12 15:54       ` Sebastian Andrzej Siewior
2019-08-13  8:23         ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).