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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 CC126C2D0A3 for ; Tue, 3 Nov 2020 19:58:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2877520E65 for ; Tue, 3 Nov 2020 19:58:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="akMqqMjR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2877520E65 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 509A46B0036; Tue, 3 Nov 2020 14:58:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 492C66B005D; Tue, 3 Nov 2020 14:58:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 359B26B0068; Tue, 3 Nov 2020 14:58:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id 069B26B0036 for ; Tue, 3 Nov 2020 14:58:38 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 970ED181AC9CB for ; Tue, 3 Nov 2020 19:58:38 +0000 (UTC) X-FDA: 77444169516.12.point35_19163c6272bb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 7712618012711 for ; Tue, 3 Nov 2020 19:58:38 +0000 (UTC) X-HE-Tag: point35_19163c6272bb X-Filterd-Recvd-Size: 3218 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Nov 2020 19:58:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1604433517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aW87E3yQfhjrReNvzduUoTGgZLBJOmiPHqndjMWgtW8=; b=akMqqMjRyUqjMp5cDlSancCsC/CWysNkT/3kl3pSSDXpUFZq+NxJvkBDSIrUn3gxrSB7SA Kg3iiCblqGQ8XqKsmutUxLwFLgrxymQnymg3+EUyXg5MzK03XXWEsZmq/w/RUQcWEFxtHX d2w8CcqF13yTWSaAzYIQRG8alkV64d4= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 110B7AF84; Tue, 3 Nov 2020 19:58:37 +0000 (UTC) Date: Tue, 3 Nov 2020 20:58:36 +0100 From: Michal Hocko To: Matthew Wilcox Cc: Chris Goldsworthy , 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: <20201103195836.GL21990@dhcp22.suse.cz> References: <20201102144449.GM27442@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201102144449.GM27442@casper.infradead.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon 02-11-20 14:44:49, Matthew Wilcox wrote: > 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. Absolutely agreed. What is even worse the proposed approach doesn't really add any new guarantee. Just look at how the new flag is used for any anonymous page and that is a subject to a long term pinning as well. So in the end a new and confusing gfp flag is proposed that doesn't really help with the underlying problem. Nacked-by: Michal Hocko -- Michal Hocko SUSE Labs