From: zhiguojiang <justinjiang@vivo.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
opensource.kernel@vivo.com
Subject: Re: [PATCH] mm: ALLOC_HIGHATOMIC flag allocation issue
Date: Tue, 21 Nov 2023 10:26:18 +0800 [thread overview]
Message-ID: <f4fbe385-3a31-4d8d-ba3b-409f3f03c7c9@vivo.com> (raw)
In-Reply-To: <ZVuXlcwgcw0ShjRQ@casper.infradead.org>
Thanks, I have updated the related modifications according to your
suggestions in patch v2.
在 2023/11/21 1:29, Matthew Wilcox 写道:
> On Mon, Nov 20, 2023 at 10:35:36AM +0800, Zhiguo Jiang wrote:
>> + /*
>> + * 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.
> Assuming that all the serious question shave been dealt with, let's
> 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 inline
>> 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)
> bool *highatomic
>
>> + /*
>> + * 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
> * avoid migrating 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.
>> + *
>> + * If the high-order atomic allocation page is alloced from buddy
> "allocated"
>
>> @@ -3208,6 +3234,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
>> struct pglist_data *last_pgdat = NULL;
>> bool last_pgdat_dirty_ok = false;
>> bool no_fallback;
>> + bool highatomc_allocation = false;
> Again, just call this 'highatomic'.
>
next prev parent reply other threads:[~2023-11-21 2:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231120023537.1785-1-justinjiang@vivo.com>
2023-11-20 17:29 ` Matthew Wilcox
2023-11-21 2:26 ` zhiguojiang [this message]
2023-12-01 7:25 Zhiguo Jiang
-- strict thread matches above, loose matches on Subject: below --
2023-08-21 9:04 Zhiguo Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4fbe385-3a31-4d8d-ba3b-409f3f03c7c9@vivo.com \
--to=justinjiang@vivo.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=opensource.kernel@vivo.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox