Skip to main content
2 of 2
deleted 707 characters in body
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336

One document in the background material mentions mapping_set_unevictable(). It says it was used in two cases:

  1. By ramfs to mark the address spaces of its inodes when they are created, and this mark remains for the life of the inode.

  2. By SYSV SHM to mark SHM_LOCK'd address spaces until SHM_UNLOCK is called.

    Note that SHM_LOCK is not required to page in the locked pages if they're swapped out; the application must touch the pages manually if it wants to ensure they're in memory.

It is now used in a third case. It is applied to i915 graphics buffers, if they are mapped by the GPU:

https://elixir.bootlin.com/linux/v5.0.17/ident/mapping_set_unevictable

Referenced in 4 files:

"The Global Graphics Translation Table (GTT) [...] takes care of the address mapping from the GPU virtual address space to physical addresses.".

sourcejedi
  • 53.5k
  • 23
  • 178
  • 336