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


Groups > linux.kernel > #1432616

Re: [PATCH v3 4/6] mm/cma: remove ALLOC_CMA

From Joonsoo Kim <iamjoonsoo.kim@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 4/6] mm/cma: remove ALLOC_CMA
Date 2016-06-28 10:20 +0200
Message-ID <rOWpr-4kK-1@gated-at.bofh.it> (permalink)
References <rCWXT-2Qp-5@gated-at.bofh.it> <rCWXT-2Qp-3@gated-at.bofh.it> <rOBbk-6NY-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 27, 2016 at 11:30:52AM +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 it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to
> >consider ALLOC_CMA at all.
> >
> >Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >---
> > mm/internal.h   |  3 +--
> > mm/page_alloc.c | 27 +++------------------------
> > 2 files changed, 4 insertions(+), 26 deletions(-)
> >
> 
> [...]
> 
> >@@ -2833,10 +2827,8 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
> > 		}
> >
> > #ifdef CONFIG_CMA
> >-		if ((alloc_flags & ALLOC_CMA) &&
> >-		    !list_empty(&area->free_list[MIGRATE_CMA])) {
> >+		if (!list_empty(&area->free_list[MIGRATE_CMA]))
> > 			return true;
> >-		}
> > #endif
> 
> Nitpick: it would be more logical to remove the whole block in this
> patch, as removing ALLOC_CMA means it's effectively false? Also less
> churn.

No, all freepages on ZONE_CMA is attached on area->free_list[MIGRATE_CMA].
We need to check whether there is a freepage on it or not to pass watermark
check for high-order allocation.

Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web