mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Split the free lists for movable and unmovable allocations
This patch adds the core of the fragmentation reduction strategy. It works by grouping pages together based on their ability to migrate or be reclaimed. Basically, it works by breaking the list in zone->free_area list into MIGRATE_TYPES number of lists. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
835c134ec4
commit
b2a0ac8875
3 changed files with 127 additions and 25 deletions
|
@ -33,8 +33,16 @@
|
|||
*/
|
||||
#define PAGE_ALLOC_COSTLY_ORDER 3
|
||||
|
||||
#define MIGRATE_UNMOVABLE 0
|
||||
#define MIGRATE_MOVABLE 1
|
||||
#define MIGRATE_TYPES 2
|
||||
|
||||
#define for_each_migratetype_order(order, type) \
|
||||
for (order = 0; order < MAX_ORDER; order++) \
|
||||
for (type = 0; type < MIGRATE_TYPES; type++)
|
||||
|
||||
struct free_area {
|
||||
struct list_head free_list;
|
||||
struct list_head free_list[MIGRATE_TYPES];
|
||||
unsigned long nr_free;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue