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=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 E7ACCC00A89 for ; Mon, 2 Nov 2020 14:40:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5F10F2084C for ; Mon, 2 Nov 2020 14:40:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="OIkOabWX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F10F2084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8206B6B0070; Mon, 2 Nov 2020 09:40:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 780C46B0072; Mon, 2 Nov 2020 09:40:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6486A6B0073; Mon, 2 Nov 2020 09:40:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 2E17E6B0070 for ; Mon, 2 Nov 2020 09:40:18 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9B970362D for ; Mon, 2 Nov 2020 14:40:17 +0000 (UTC) X-FDA: 77439738474.22.rest94_36109ed272b0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 5D57118038E68 for ; Mon, 2 Nov 2020 14:40:17 +0000 (UTC) X-HE-Tag: rest94_36109ed272b0 X-Filterd-Recvd-Size: 3857 Received: from z5.mailgun.us (z5.mailgun.us [104.130.96.5]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Mon, 2 Nov 2020 14:40:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604328016; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=0A7SV27oT9X2OLjiEXNiar9HJuar9z66aG37SwSDow0=; b=OIkOabWXkwETEzDkPwlYSdqmZDdomEHfAS2BzGhNYNBcqBxPlUig43xpvkHHel46ueLClBJb 7lGxCcOcgiOw7MRl03d+mDTzbAru0NdEOe26ul4WqIfkCc8jdkoua7W+TqJo9jY60Q8s8gTD P8SHzGxvFWCmNhlTa5od6F4JlWg= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyIwY2Q3OCIsICJsaW51eC1tbUBrdmFjay5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 5fa01a4fca0638c0dc61355b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 02 Nov 2020 14:40:15 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id F1454C433F0; Mon, 2 Nov 2020 14:40:14 +0000 (UTC) Received: from cgoldswo-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cgoldswo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1A683C433C8; Mon, 2 Nov 2020 14:40:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1A683C433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=cgoldswo@codeaurora.org From: Chris Goldsworthy To: Andrew Morton , Minchan Kim , Nitin Gupta , Sergey Senozhatsky Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chris Goldsworthy Subject: [PATCH 0/2] Increasing CMA Utilization with a GFP Flag Date: Mon, 2 Nov 2020 06:39:20 -0800 Message-Id: X-Mailer: git-send-email 2.7.4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. Heesub Shin (1): cma: redirect page allocation to CMA Vinayak Menon (1): zram: allow zram to allocate CMA pages drivers/block/zram/zram_drv.c | 5 +-- include/linux/gfp.h | 15 ++++++++ include/linux/highmem.h | 4 ++- include/linux/mmzone.h | 4 +++ mm/page_alloc.c | 83 +++++++++++++++++++++++++++---------------- mm/zsmalloc.c | 4 +-- 6 files changed, 79 insertions(+), 36 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project