Linux-MM
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Linux Memory Management

  • Front Page

  • Documentation

  • Internals

  • Projects

  • Academic Research

References

  • LinuxKernelMailingLists

  • MemoryManagementLinks

Related sites

  • Kernel Newbies

  • Memory Management Forum

Wiki

  • Site Editors

  • Side Bar

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents
Revision 2 as of 2017-12-30 01:05:10
LinuxMM:
  • LinuxMMProjects
  • Ashmem

Ashmem is a kernel feature written by Robert Love: http://lwn.net/Articles/452035/

Problems:

  1. It's pages are shrunk by memory pressure via the slab shrinkers. But the pages are not on the normal VM LRU lists. So, they are not ordered the same and do not have the same reclaim behavior
  2. The patch is only in Android kernels at the moment

Imagine what would happen if we took a tmpfs page and instead of swapping it out, we simply discard it. It would be on all the LRUs, but would behave quite a bit like an ashmem unpinned page. For instance: http://sr71.net/~dave/linux/do-tmpfs-now.patch

How do we reimplement ashmem's unpinned ranges?

  • Can not use mlock() since the file might not always be mapped
  • VMA structure is nice because it can easily be stored in an rb-tree and the code also handles splits/merges, but it's probably too heavyweight to break out on its own
  • flock() and fcntl() both have fd-based lock mechanisms, can those be repurposed?
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01