From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 980CEC00A89 for ; Mon, 2 Nov 2020 14:45:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24E172240C for ; Mon, 2 Nov 2020 14:45:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="e0ip68za" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24E172240C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8AE666B0070; Mon, 2 Nov 2020 09:45:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8110C6B0072; Mon, 2 Nov 2020 09:45:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D7E66B0073; Mon, 2 Nov 2020 09:45:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 36FC76B0070 for ; Mon, 2 Nov 2020 09:45:07 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C40EB181AC544 for ; Mon, 2 Nov 2020 14:45:06 +0000 (UTC) X-FDA: 77439750612.10.hole73_3901933272b0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 0448916A4DB for ; Mon, 2 Nov 2020 14:44:57 +0000 (UTC) X-HE-Tag: hole73_3901933272b0 X-Filterd-Recvd-Size: 2781 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Mon, 2 Nov 2020 14:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=LAIhWQkbEQ84z1rg6f9nPHULGOV+ks+CCN5U2ajICqs=; b=e0ip68zaNrPteHrhWIOl5+jLot a30V0TtxffodM6dQWHkJ1PvhuSZVZRyixvD+OdL5BtSKd4lTerkUbmvmpSrWVYzwfsbEN40OwSYu4 jjAVn8feDYdIs7yS0G4zsqNo5kom/t2fHQwr/W/5Ybo8TWn0Wwkuw+GzL0A4Bb8Ihp0U01jaf7Sdn W46Zhn9Oa+HliKtVaR45F5C80wwpYCrrFadfATcAtzlUoPHjTEsGEFEaQ5agi17bjiVqcWzSaFCf5 Uc1t2uaUzHHv5e30GhlxmI1HCuZb5IwON8qbDeHHQo4pgfHH+VJQ/PCNr32SPJfXoDuq0iRZsA4cS g/Q1K2tQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZb4j-0007IO-M6; Mon, 02 Nov 2020 14:44:49 +0000 Date: Mon, 2 Nov 2020 14:44:49 +0000 From: Matthew Wilcox To: Chris Goldsworthy Cc: Andrew Morton , Minchan Kim , Nitin Gupta , Sergey Senozhatsky , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Increasing CMA Utilization with a GFP Flag Message-ID: <20201102144449.GM27442@casper.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.148930, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 02, 2020 at 06:39:20AM -0800, Chris Goldsworthy wrote: > The current approach to increasing CMA utilization introduced in > commit 16867664936e ("mm,page_alloc,cma: conditionally prefer cma > pageblocks for movable allocations") increases CMA utilization by > redirecting MIGRATE_MOVABLE allocations to a CMA region, when > greater than half of the free pages in a given zone are CMA pages. > The issue in this approach is that allocations with type > MIGRATE_MOVABLE can still succumb to pinning. To get around > this, one approach is to re-direct allocations to the CMA areas, that > are known not to be victims of pinning. > > To this end, this series brings in __GFP_CMA, which we mark with > allocations that we know are safe to be redirected to a CMA area. This feels backwards to me. What you're essentially saying is "Some allocations marked with GFP_MOVABLE turn out not to be movable, so we're going to add another GFP_REALLY_MOVABLE flag" instead of tracking down which GFP_MOVABLE allocations aren't really movable.