Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1431877 > unrolled thread

Re: [PATCH v3 5/6] mm/cma: remove MIGRATE_CMA

Started byVlastimil Babka <vbabka@suse.cz>
First post2016-06-27 11:50 +0200
Last post2016-06-28 10:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 5/6] mm/cma: remove MIGRATE_CMA Vlastimil Babka <vbabka@suse.cz> - 2016-06-27 11:50 +0200
    Re: [PATCH v3 5/6] mm/cma: remove MIGRATE_CMA Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-06-28 10:20 +0200

#1431877 — Re: [PATCH v3 5/6] mm/cma: remove MIGRATE_CMA

FromVlastimil Babka <vbabka@suse.cz>
Date2016-06-27 11:50 +0200
SubjectRe: [PATCH v3 5/6] mm/cma: remove MIGRATE_CMA
Message-ID<rOBkZ-6T8-3@gated-at.bofh.it>
On 05/26/2016 08:22 AM, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Now, all reserved pages for CMA region are belong to the ZONE_CMA
> and there is no other type of pages. Therefore, we don't need to
> use MIGRATE_CMA to distinguish and handle differently for CMA pages
> and ordinary pages. Remove MIGRATE_CMA.
>
> Unfortunately, this patch make free CMA counter incorrect because
> we count it when pages are on the MIGRATE_CMA. It will be fixed
> by next patch. I can squash next patch here but it makes changes
> complicated and hard to review so I separate that.

Doesn't sound like a big deal.

> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

[...]

> @@ -7442,14 +7401,14 @@ int alloc_contig_range(unsigned long start, unsigned long end,
>  	 * allocator removing them from the buddy system.  This way
>  	 * page allocator will never consider using them.
>  	 *
> -	 * This lets us mark the pageblocks back as
> -	 * MIGRATE_CMA/MIGRATE_MOVABLE so that free pages in the
> -	 * aligned range but not in the unaligned, original range are
> -	 * put back to page allocator so that buddy can use them.
> +	 * This lets us mark the pageblocks back as MIGRATE_MOVABLE
> +	 * so that free pages in the aligned range but not in the
> +	 * unaligned, original range are put back to page allocator
> +	 * so that buddy can use them.
>  	 */
>
>  	ret = start_isolate_page_range(pfn_max_align_down(start),
> -				       pfn_max_align_up(end), migratetype,
> +				       pfn_max_align_up(end), MIGRATE_MOVABLE,
>  				       false);
>  	if (ret)
>  		return ret;
> @@ -7528,7 +7487,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
>
>  done:
>  	undo_isolate_page_range(pfn_max_align_down(start),
> -				pfn_max_align_up(end), migratetype);
> +				pfn_max_align_up(end), MIGRATE_MOVABLE);
>  	return ret;
>  }

Looks like all callers of {start,undo}_isolate_page_range() now use 
MIGRATE_MOVABLE, so it could be removed.

[toc] | [next] | [standalone]


#1432620

FromJoonsoo Kim <iamjoonsoo.kim@lge.com>
Date2016-06-28 10:20 +0200
Message-ID<rOWpr-4kK-33@gated-at.bofh.it>
In reply to#1431877
On Mon, Jun 27, 2016 at 11:46:39AM +0200, Vlastimil Babka wrote:
> On 05/26/2016 08:22 AM, js1304@gmail.com wrote:
> >From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >
> >Now, all reserved pages for CMA region are belong to the ZONE_CMA
> >and there is no other type of pages. Therefore, we don't need to
> >use MIGRATE_CMA to distinguish and handle differently for CMA pages
> >and ordinary pages. Remove MIGRATE_CMA.
> >
> >Unfortunately, this patch make free CMA counter incorrect because
> >we count it when pages are on the MIGRATE_CMA. It will be fixed
> >by next patch. I can squash next patch here but it makes changes
> >complicated and hard to review so I separate that.
> 
> Doesn't sound like a big deal.

Okay.

> 
> >Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> 
> [...]
> 
> >@@ -7442,14 +7401,14 @@ int alloc_contig_range(unsigned long start, unsigned long end,
> > 	 * allocator removing them from the buddy system.  This way
> > 	 * page allocator will never consider using them.
> > 	 *
> >-	 * This lets us mark the pageblocks back as
> >-	 * MIGRATE_CMA/MIGRATE_MOVABLE so that free pages in the
> >-	 * aligned range but not in the unaligned, original range are
> >-	 * put back to page allocator so that buddy can use them.
> >+	 * This lets us mark the pageblocks back as MIGRATE_MOVABLE
> >+	 * so that free pages in the aligned range but not in the
> >+	 * unaligned, original range are put back to page allocator
> >+	 * so that buddy can use them.
> > 	 */
> >
> > 	ret = start_isolate_page_range(pfn_max_align_down(start),
> >-				       pfn_max_align_up(end), migratetype,
> >+				       pfn_max_align_up(end), MIGRATE_MOVABLE,
> > 				       false);
> > 	if (ret)
> > 		return ret;
> >@@ -7528,7 +7487,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
> >
> > done:
> > 	undo_isolate_page_range(pfn_max_align_down(start),
> >-				pfn_max_align_up(end), migratetype);
> >+				pfn_max_align_up(end), MIGRATE_MOVABLE);
> > 	return ret;
> > }
> 
> Looks like all callers of {start,undo}_isolate_page_range() now use
> MIGRATE_MOVABLE, so it could be removed.

You're right. Will do in next spin.

Thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web