boot-time-mm.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ===========================
  2. Boot time memory management
  3. ===========================
  4. Early system initialization cannot use "normal" memory management
  5. simply because it is not set up yet. But there is still need to
  6. allocate memory for various data structures, for instance for the
  7. physical page allocator.
  8. A specialized allocator called ``memblock`` performs the
  9. boot time memory management. The architecture specific initialization
  10. must set it up in :c:func:`setup_arch` and tear it down in
  11. :c:func:`mem_init` functions.
  12. Once the early memory management is available it offers a variety of
  13. functions and macros for memory allocations. The allocation request
  14. may be directed to the first (and probably the only) node or to a
  15. particular node in a NUMA system. There are API variants that panic
  16. when an allocation fails and those that don't.
  17. Memblock also offers a variety of APIs that control its own behaviour.
  18. Memblock Overview
  19. =================
  20. .. kernel-doc:: mm/memblock.c
  21. :doc: memblock overview
  22. Functions and structures
  23. ========================
  24. Here is the description of memblock data structures, functions and
  25. macros. Some of them are actually internal, but since they are
  26. documented it would be silly to omit them. Besides, reading the
  27. descriptions for the internal functions can help to understand what
  28. really happens under the hood.
  29. .. kernel-doc:: include/linux/memblock.h
  30. .. kernel-doc:: mm/memblock.c
  31. :functions: