From: Xishi Qiu <qiuxishi@huawei.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
Minchan Kim <minchan@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Yisheng Xie <xieyisheng1@huawei.com>,
Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible
Date: Tue, 7 Mar 2017 19:03:39 +0800 [thread overview]
Message-ID: <58BE938B.9020908@huawei.com> (raw)
In-Reply-To: <20170307104758.GE28642@dhcp22.suse.cz>
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
>>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
Minchan Kim <minchan@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Yisheng Xie <xieyisheng1@huawei.com>,
Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible
Date: Tue, 7 Mar 2017 19:03:39 +0800 [thread overview]
Message-ID: <58BE938B.9020908@huawei.com> (raw)
In-Reply-To: <20170307104758.GE28642@dhcp22.suse.cz>
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
>>
>
next prev parent reply other threads:[~2017-03-07 11:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 10:33 [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Xishi Qiu
2017-03-07 10:33 ` Xishi Qiu
2017-03-07 10:44 ` [RFC][PATCH 2/2] mm: unreserve highatomic pageblock if direct reclaim failed Xishi Qiu
2017-03-07 10:44 ` Xishi Qiu
2017-03-07 10:47 ` [RFC][PATCH 1/2] mm: use MIGRATE_HIGHATOMIC as late as possible Michal Hocko
2017-03-07 10:47 ` Michal Hocko
2017-03-07 11:03 ` Xishi Qiu [this message]
2017-03-07 11:03 ` Xishi Qiu
2017-03-07 11:29 ` Michal Hocko
2017-03-07 11:29 ` Michal Hocko
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=58BE938B.9020908@huawei.com \
--to=qiuxishi@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=vbabka@suse.cz \
--cc=xieyisheng1@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.