Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef _LINUX_MMZONE_H
  2. #define _LINUX_MMZONE_H
  3.  
  4. #include <linux/spinlock.h>
  5. #include <linux/list.h>
  6. #include <linux/wait.h>
  7. #include <linux/bitops.h>
  8. #include <linux/atomic.h>
  9.  
  10. /* Free memory management - zoned buddy allocator.  */
  11. #ifndef CONFIG_FORCE_MAX_ZONEORDER
  12. #define MAX_ORDER 11
  13. #else
  14. #define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER
  15. #endif
  16. #define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1))
  17.  
  18. /*
  19.  * PAGE_ALLOC_COSTLY_ORDER is the order at which allocations are deemed
  20.  * costly to service.  That is between allocation orders which should
  21.  * coalesce naturally under reasonable reclaim pressure and those which
  22.  * will not.
  23.  */
  24. #define PAGE_ALLOC_COSTLY_ORDER 3
  25.  
  26. enum {
  27.         MIGRATE_UNMOVABLE,
  28.         MIGRATE_MOVABLE,
  29.         MIGRATE_RECLAIMABLE,
  30.         MIGRATE_PCPTYPES,       /* the number of types on the pcp lists */
  31.         MIGRATE_HIGHATOMIC = MIGRATE_PCPTYPES,
  32. #ifdef CONFIG_CMA
  33.         /*
  34.          * MIGRATE_CMA migration type is designed to mimic the way
  35.          * ZONE_MOVABLE works.  Only movable pages can be allocated
  36.          * from MIGRATE_CMA pageblocks and page allocator never
  37.          * implicitly change migration type of MIGRATE_CMA pageblock.
  38.          *
  39.          * The way to use it is to change migratetype of a range of
  40.          * pageblocks to MIGRATE_CMA which can be done by
  41.          * __free_pageblock_cma() function.  What is important though
  42.          * is that a range of pageblocks must be aligned to
  43.          * MAX_ORDER_NR_PAGES should biggest page be bigger then
  44.          * a single pageblock.
  45.          */
  46.         MIGRATE_CMA,
  47. #endif
  48. #ifdef CONFIG_MEMORY_ISOLATION
  49.         MIGRATE_ISOLATE,        /* can't allocate from here */
  50. #endif
  51.         MIGRATE_TYPES
  52. };
  53.  
  54. #endif /* _LINUX_MMZONE_H */
  55.