Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594130
| From | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible |
| Date | 2017-03-07 12:10 +0100 |
| Message-ID | <tilab-6G6-43@gated-at.bofh.it> (permalink) |
| References | <tikH7-6ao-1@gated-at.bofh.it> <tikQO-6fF-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2017/3/7 18:47, Michal Hocko wrote:
> On Tue 07-03-17 18:33:53, Xishi Qiu wrote:
>> MIGRATE_HIGHATOMIC page blocks are reserved for an atomic
>> high-order allocation, so use it as late as possible.
>
> Why is this better? Are you seeing any problem which this patch
> resolves? In other words the patch description should explain why not
> only what (that is usually clear from looking at the diff).
>
Hi Michal,
I have not see any problem yet, I think if we reserve more high order
pageblocks, the more success rate we will get when meet an atomic
high-order allocation, right?
Thanks,
Xishi Qiu
>> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
>> ---
>> mm/page_alloc.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 40d79a6..2331840 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -2714,14 +2714,12 @@ struct page *rmqueue(struct zone *preferred_zone,
>> spin_lock_irqsave(&zone->lock, flags);
>>
>> do {
>> - page = NULL;
>> - if (alloc_flags & ALLOC_HARDER) {
>> + page = __rmqueue(zone, order, migratetype);
>> + if (!page && alloc_flags & ALLOC_HARDER) {
>> page = __rmqueue_smallest(zone, order, MIGRATE_HIGHATOMIC);
>> if (page)
>> trace_mm_page_alloc_zone_locked(page, order, migratetype);
>> }
>> - if (!page)
>> - page = __rmqueue(zone, order, migratetype);
>> } while (page && check_new_pages(page, order));
>> spin_unlock(&zone->lock);
>> if (!page)
>> --
>> 1.8.3.1
>>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Xishi Qiu <qiuxishi@huawei.com> - 2017-03-07 11:40 +0100
Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Michal Hocko <mhocko@kernel.org> - 2017-03-07 11:50 +0100
Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Xishi Qiu <qiuxishi@huawei.com> - 2017-03-07 12:10 +0100
Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Michal Hocko <mhocko@kernel.org> - 2017-03-07 15:00 +0100
[RFC][PATCH 2/2] mm: unreserve highatomic pageblock if direct reclaim failed Xishi Qiu <qiuxishi@huawei.com> - 2017-03-07 11:50 +0100
csiph-web