Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp770843pxb; Tue, 3 Nov 2020 12:02:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxi5RLwqBi0n8qjwFJisfMzXT/X6qpQ0lqOJXuoZIAkNPXvlY6bfiImXkRqltpH8ehbOm2R X-Received: by 2002:a17:906:171a:: with SMTP id c26mr22090427eje.380.1604433745339; Tue, 03 Nov 2020 12:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604433745; cv=none; d=google.com; s=arc-20160816; b=giQZgkNsE9yWDUHankMPv+Pr0gDY+ogQdLfSw1/UXCwIOeLTJ6IgLECLR+q/lLDVKG JqOdZ5ZbuSd8GnGNMmAmUztu4uy2y/SWVczjHa++hGgFOEJpQEtao90Hv/j6VmUM6SoW mk1VGu8Wy56wxIifk7ykrKpbtXUU+KHnnEvNHJkkLYfvPV4GyLeNfb2Yzr7gAThDjYc+ IsgedWwU9Dn4J10NYY2Ew8kQK2dYhgQLPnUCNxpEVB3q82T4AAW1vxvTCGR2iHtLhm0h Gtrok75x8VSwgRn1OnZ4N/vF0qlmb+7vReC+u0yWkQHsHLIhDn6iK9CUrBkYPcqyxL+g rFwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aW87E3yQfhjrReNvzduUoTGgZLBJOmiPHqndjMWgtW8=; b=J3yrNWJZCL+5Dwm2g51kEaXx7iMIYdBIWihg57nymURZmAPCK7qhH7YPilZXrfHSu/ ksICNHS0diFOPyIEIh+6mcm+Gn8aUW11kkVPFNcf+LCbJ84KbMuQU60gZAu1a47fvTJf YNMID4btz79mi0j9lJKw/VA/2BquNC6l+Ly/M9+EjOLHw3hoVRsTkmgIaq3FzNMPsnHd GGfGzKZritgO5N4ouOAKz4lJah9/6ocCiXc2KlVATw/0Ugw1GiXeKdrOZGlEBfj2yGOh I6OGoa8DQflYqLaJ9tA2ZckTb5VJEMf3BibW45ToUcwwhZ6lM2+qy4RJjZ1JQ2F5Bs0x EvLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=akMqqMjR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si14617270edj.516.2020.11.03.12.02.02; Tue, 03 Nov 2020 12:02:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=akMqqMjR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729693AbgKCT6j (ORCPT + 99 others); Tue, 3 Nov 2020 14:58:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:54010 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbgKCT6i (ORCPT ); Tue, 3 Nov 2020 14:58:38 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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