All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Feng <puck.chen@hisilicon.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Feng Tang <feng.tang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
	Laura Abbott <lauraa@codeaurora.org>,
	Minchan Kim <minchan@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Rui Teng <rui.teng@linux.vnet.ibm.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Yiping Xu <xuyiping@hisilicon.com>,
	"fujun (F)" <oliver.fu@hisilicon.com>,
	Zhuangluan Su <suzhuangluan@hisilicon.com>,
	Dan Zhao <dan.zhao@hisilicon.com>,
	saberlily.xia@hisilicon.com
Subject: Re: [PATCH v3 0/6] Introduce ZONE_CMA
Date: Tue, 21 Jun 2016 10:08:24 +0800	[thread overview]
Message-ID: <5768A198.7050607@hisilicon.com> (raw)
In-Reply-To: <20160620064816.GB13747@js1304-P5Q-DELUXE>



On 2016/6/20 14:48, Joonsoo Kim wrote:
> On Fri, Jun 17, 2016 at 03:38:49PM +0800, Chen Feng wrote:
>> Hi Kim & feng,
>>
>> Thanks for the share. In our platform also has the same use case.
>>
>> We only let the alloc with GFP_HIGHUSER_MOVABLE in memory.c to use cma memory.
>>
>> If we add zone_cma, It seems can resolve the cma migrate issue.
>>
>> But when free_hot_cold_page, we need let the cma page goto system directly not the pcp.
>> It can be fail while cma_alloc and cma_release. If we alloc the whole cma pages which
>> declared before.
> 
> Hmm...I'm not sure I understand your explanation. So, if I miss
> something, please let me know. We calls drain_all_pages() when
> isolating pageblock and alloc_contig_range() also has one
> drain_all_pages() calls to drain pcp pages. And, after pageblock isolation,
> freed pages belonging to MIGRATE_ISOLATE pageblock will go to the
> buddy directly so there would be no problem you mentioned. Isn't it?
> 
Yes, you are right.

I mean if the we free cma page to pcp-list, it will goto the migrate_movable list.

Then the alloc with movable flag can use the cma memory from the list with buffered_rmqueue.

But that's not what we want. It will cause the migrate fail if all movable alloc can use cma memory.

If I am wrong, please correct me.

Thanks.

> Thanks.
> 
> .
> 

--
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: Chen Feng <puck.chen@hisilicon.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Feng Tang <feng.tang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
	Laura Abbott <lauraa@codeaurora.org>,
	"Minchan Kim" <minchan@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"Michal Nazarewicz" <mina86@mina86.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Rui Teng <rui.teng@linux.vnet.ibm.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Yiping Xu <xuyiping@hisilicon.com>,
	"fujun (F)" <oliver.fu@hisilicon.com>,
	"Zhuangluan Su" <suzhuangluan@hisilicon.com>,
	Dan Zhao <dan.zhao@hisilicon.com>, <saberlily.xia@hisilicon.com>
Subject: Re: [PATCH v3 0/6] Introduce ZONE_CMA
Date: Tue, 21 Jun 2016 10:08:24 +0800	[thread overview]
Message-ID: <5768A198.7050607@hisilicon.com> (raw)
In-Reply-To: <20160620064816.GB13747@js1304-P5Q-DELUXE>



On 2016/6/20 14:48, Joonsoo Kim wrote:
> On Fri, Jun 17, 2016 at 03:38:49PM +0800, Chen Feng wrote:
>> Hi Kim & feng,
>>
>> Thanks for the share. In our platform also has the same use case.
>>
>> We only let the alloc with GFP_HIGHUSER_MOVABLE in memory.c to use cma memory.
>>
>> If we add zone_cma, It seems can resolve the cma migrate issue.
>>
>> But when free_hot_cold_page, we need let the cma page goto system directly not the pcp.
>> It can be fail while cma_alloc and cma_release. If we alloc the whole cma pages which
>> declared before.
> 
> Hmm...I'm not sure I understand your explanation. So, if I miss
> something, please let me know. We calls drain_all_pages() when
> isolating pageblock and alloc_contig_range() also has one
> drain_all_pages() calls to drain pcp pages. And, after pageblock isolation,
> freed pages belonging to MIGRATE_ISOLATE pageblock will go to the
> buddy directly so there would be no problem you mentioned. Isn't it?
> 
Yes, you are right.

I mean if the we free cma page to pcp-list, it will goto the migrate_movable list.

Then the alloc with movable flag can use the cma memory from the list with buffered_rmqueue.

But that's not what we want. It will cause the migrate fail if all movable alloc can use cma memory.

If I am wrong, please correct me.

Thanks.

> Thanks.
> 
> .
> 

  reply	other threads:[~2016-06-21  2:11 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  6:22 [PATCH v3 0/6] Introduce ZONE_CMA js1304
2016-05-26  6:22 ` js1304
2016-05-26  6:22 ` [PATCH v3 1/6] mm/page_alloc: recalculate some of zone threshold when on/offline memory js1304
2016-05-26  6:22   ` js1304
2016-06-24 13:20   ` Vlastimil Babka
2016-06-24 13:20     ` Vlastimil Babka
2016-06-28  8:12     ` Joonsoo Kim
2016-06-28  8:12       ` Joonsoo Kim
2016-05-26  6:22 ` [PATCH v3 2/6] mm/cma: introduce new zone, ZONE_CMA js1304
2016-05-26  6:22   ` js1304
2016-05-26  6:22 ` [PATCH v3 3/6] mm/cma: populate ZONE_CMA js1304
2016-05-26  6:22   ` js1304
2016-06-22  9:23   ` Chen Feng
2016-06-22  9:23     ` Chen Feng
2016-06-23  2:52     ` Joonsoo Kim
2016-06-23  2:52       ` Joonsoo Kim
2016-06-28 11:23       ` Chen Feng
2016-06-28 11:23         ` Chen Feng
2016-06-29  8:00         ` Joonsoo Kim
2016-06-29  8:00           ` Joonsoo Kim
2016-06-27  8:24   ` Vlastimil Babka
2016-06-27  8:24     ` Vlastimil Babka
2016-06-28  8:31     ` Joonsoo Kim
2016-06-28  8:31       ` Joonsoo Kim
2016-05-26  6:22 ` [PATCH v3 4/6] mm/cma: remove ALLOC_CMA js1304
2016-05-26  6:22   ` js1304
2016-06-27  9:30   ` Vlastimil Babka
2016-06-27  9:30     ` Vlastimil Babka
2016-06-28  8:16     ` Joonsoo Kim
2016-06-28  8:16       ` Joonsoo Kim
2016-05-26  6:22 ` [PATCH v3 5/6] mm/cma: remove MIGRATE_CMA js1304
2016-05-26  6:22   ` js1304
2016-05-27  1:42   ` Chen Feng
2016-05-27  1:42     ` Chen Feng
2016-05-27  5:32     ` Joonsoo Kim
2016-05-27  5:32       ` Joonsoo Kim
2016-06-27  9:46   ` Vlastimil Babka
2016-06-27  9:46     ` Vlastimil Babka
2016-06-28  8:17     ` Joonsoo Kim
2016-06-28  8:17       ` Joonsoo Kim
2016-05-26  6:22 ` [PATCH v3 6/6] mm/cma: remove per zone CMA stat js1304
2016-05-26  6:22   ` js1304
2016-06-27  9:54   ` Vlastimil Babka
2016-06-27  9:54     ` Vlastimil Babka
2016-05-26  8:04 ` [PATCH v3 0/6] Introduce ZONE_CMA Feng Tang
2016-05-26  8:04   ` Feng Tang
2016-05-27  5:28   ` Joonsoo Kim
2016-05-27  5:28     ` Joonsoo Kim
2016-05-27  6:25     ` Feng Tang
2016-05-27  6:25       ` Feng Tang
2016-05-27  6:42       ` Joonsoo Kim
2016-05-27  6:42         ` Joonsoo Kim
2016-05-27  7:27         ` Feng Tang
2016-05-27  7:27           ` Feng Tang
2016-05-30  5:45           ` Joonsoo Kim
2016-05-30  5:45             ` Joonsoo Kim
2016-06-17  7:38           ` Chen Feng
2016-06-17  7:38             ` Chen Feng
2016-06-20  6:48             ` Joonsoo Kim
2016-06-20  6:48               ` Joonsoo Kim
2016-06-21  2:08               ` Chen Feng [this message]
2016-06-21  2:08                 ` Chen Feng
2016-06-21  6:56                 ` Joonsoo Kim
2016-06-21  6:56                   ` Joonsoo Kim
2016-06-27 11:25 ` Balbir Singh
2016-06-27 11:25   ` Balbir Singh
2016-06-29  7:57   ` Joonsoo Kim
2016-06-29  7:57     ` Joonsoo Kim

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=5768A198.7050607@hisilicon.com \
    --to=puck.chen@hisilicon.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=dan.zhao@hisilicon.com \
    --cc=feng.tang@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=lauraa@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mgorman@techsingularity.net \
    --cc=mina86@mina86.com \
    --cc=minchan@kernel.org \
    --cc=oliver.fu@hisilicon.com \
    --cc=riel@redhat.com \
    --cc=rui.teng@linux.vnet.ibm.com \
    --cc=saberlily.xia@hisilicon.com \
    --cc=suzhuangluan@hisilicon.com \
    --cc=vbabka@suse.cz \
    --cc=xuyiping@hisilicon.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.