On Mon, Nov 20, 2023 at 10:35:36AM +0800, Zhiguo Jiang wrote:
+ /*Assuming that all the serious question shave been dealt with, let's
+ * If pcplist is empty and alloc_flags is with ALLOC_HIGHATOMIC,
+ * it should alloc from buddy highatomic migrate freelist firstly
+ * to ensure quick and successful allocation.
fix the less important problems ...
* If pcplist is empty and alloc_flags contains
* ALLOC_HIGHATOMIC, alloc from buddy highatomic
* freelist first.
@@ -2918,7 +2927,7 @@ static inlinebool *highatomic
struct page *rmqueue(struct zone *preferred_zone,
struct zone *zone, unsigned int order,
gfp_t gfp_flags, unsigned int alloc_flags,
- int migratetype)
+ int migratetype, bool *highatomc_allocation)
+ /** avoid migrating an increasing number of pages into buddy
+ * The high-order atomic allocation pageblock reserved conditions:
+ *
+ * If the high-order atomic allocation page is alloced from pcplist,
+ * the highatomic pageblock does not need to be reserved, which can
+ * void to migrate an increasing number of pages into buddy
+ * MIGRATE_HIGHATOMIC freelist and lead to an increasing risk of"increased"
+ * allocation failure on other buddy migrate freelists."allocated"
+ *
+ * If the high-order atomic allocation page is alloced from buddy
@@ -3208,6 +3234,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,Again, just call this 'highatomic'.
struct pglist_data *last_pgdat = NULL;
bool last_pgdat_dirty_ok = false;
bool no_fallback;
+ bool highatomc_allocation = false;