Git Product home page Git Product logo

linux-vm-notes's Introduction

Linux VM Notes

IMPORTANT

These notes are superceded by my new linux mm book project where I will be trying to write a book on the subject based on a recent kernel. All future efforts in this area will be made there. See linuxmemory.org for updates on this.

Contents

  1. Fundamentals - Overview of virtual memory concepts without referencing any actual code or making assumptions about prior knowledge.

  2. Page Tables - Discussion about what page tables are, how they are used in linux, how they are manually traversed, the TLB and finally how page tables are allocated and freed.

  3. Process Address Space - Discussion about virtual memory address space for processes - managing VMAs, process data structure construction/destruction, file/device-backed memory regions, page faulting, demand allocation, COW pages, copying to/from userland.

  4. Transparent Huge Pages - Discussion about the kernel's transparent huge pages functionality.

  5. Out of Memory Killer - Discussion about overcommit and how the OOM killer selects and kills victims.

  6. Process Autopsy - Examining the memory allocation performed by the kernel for a simple userland application.

Introduction

NOTE: I target linux 4.6 and an x86-64 non-NUMA system.

This repo contains my notes on the linux 4.6 VM subsystem. I don't make any claim to their quality or usefulness. They are an ongoing project and as such are a constant work in progress.

This work first originated from the notes I took from the excellent Understanding the Linux Virtual Memory Manager by Mel Gorman which, while great, targets the 2.4.22 kernel (released in 2003.) The obvious next stage of study was to take notes for a recent kernel, which is what these notes are!

I am specifically targeting the 4.6 kernel since it was the mainline version at the time of writing and should remain a sane and stable basis for notes and hacks for the foreseeable future. I may update to newer kernel versions over time depending on whether it makes sense to do so (and if I succeed at this project of course!)

Hacks

Speaking of hacks linux-vm-notes's sister repo, linux-vm-hacks, is where I'm putting exploratory code and patches relating to my exploration of the VM subsystem.

License

These notes are licensed under Creative Commons BY-NC-SA.

linux-vm-notes's People

Contributors

lorenzo-stoakes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.