From patchwork Mon Nov 2 14:39:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Goldsworthy X-Patchwork-Id: 11874047 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB3986A2 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 54A7B20731 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 54A7B20731 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 780C46B0072; Mon, 2 Nov 2020 09:40:18 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org 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-Original-To: linux-mm@kvack.org 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-Spam-Summary: 1,0,0,0385e352d9b2d6ad,d41d8cd98f00b204,bounce+d06763.be9e4a-linux-mm=kvack.org@mg.codeaurora.org,,RULES_HIT:41:69:355:379:541:966:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3871:3874:4250:4321:4385:4605:5007:6120:6261:6653:7901:8784:10004:11218:11232:11658:11914:12043:12048:12291:12296:12297:12517:12519:12555:12679:12683:12986:13069:13161:13229:13311:13357:14096:14384:14394:14721:21080:21451:21627:21972:22119:30012:30054,0,RBL:104.130.96.5:@mg.codeaurora.org:.lbl8.mailshell.net-62.14.0.100 64.201.201.201;04y8q44tpex6ywmshwff6skic1km8ycgbzqmngmhq4bk388ejor6p9oc3fyaumh.xf1bi6m8k8gzf4rxjdj3jgfsenuqrzi97adb9h3kkqro9wq5zjei8zsu6uf8kjr.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:70,LUA_SUMMARY:none 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) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 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(-) Nacked-by: David Hildenbrand Nacked-by: Michal Hocko