lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Jun 2016 17:16:01 +0900
From:	Joonsoo Kim <iamjoonsoo.kim@....com>
To:	Vlastimil Babka <vbabka@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	mgorman@...hsingularity.net, Laura Abbott <lauraa@...eaurora.org>,
	Minchan Kim <minchan@...nel.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Rui Teng <rui.teng@...ux.vnet.ibm.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/6] mm/cma: remove ALLOC_CMA

On Mon, Jun 27, 2016 at 11:30:52AM +0200, Vlastimil Babka wrote:
> On 05/26/2016 08:22 AM, js1304@...il.com wrote:
> >From: Joonsoo Kim <iamjoonsoo.kim@....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@....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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ