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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F653C3DA6E for ; Fri, 5 Jan 2024 23:47:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE8A86B02C5; Fri, 5 Jan 2024 18:47:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A994A6B02CA; Fri, 5 Jan 2024 18:47:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 960396B02CD; Fri, 5 Jan 2024 18:47:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8737A6B02C5 for ; Fri, 5 Jan 2024 18:47:32 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5ACDBA214A for ; Fri, 5 Jan 2024 23:47:32 +0000 (UTC) X-FDA: 81646896744.09.7ABACBE Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf12.hostedemail.com (Postfix) with ESMTP id 3691A4000D for ; Fri, 5 Jan 2024 23:47:29 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="CZ WJ+NS"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf12.hostedemail.com: domain of quic_sukadev@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_sukadev@quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704498449; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=dk/9wd6mk3XvZJWT8D4yhYy3MZa/HSdG4Hz96XTchxU=; b=PXVRAYvt7NhJbF48gnF2LixaA4emvkHDXtfImx2ehq86Nq/0HtIkL16tNrFS9hEi33fPvn Ggy0eW4SrV1ryJAdB3+GsIUkYy7QRYLuGYEBeqyKdhg+7JTJqpvQNFQhN5eyxDCBgz9H4Y P/BlzjQ3rOvbstMKYjt5XxuNdXtFKe8= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="CZ WJ+NS"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf12.hostedemail.com: domain of quic_sukadev@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_sukadev@quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704498449; a=rsa-sha256; cv=none; b=4EyPKkjAhqpFlEoFqhbCCuJnhjAzwUudN1CCFk4xb9LWtKRvkNL0vQ5XDTdkybHIW7S3Vl uM0hfuMFW3NsNepymSpRPtZPq+wNk1EMsVR2I8RI5SQU80nfKD9dmVDjJYD4I+8PEspsLj +WeR9TYJ5Y7pDWn2L0D5M1gWcjcGHWU= Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 405NHbCV020756; Fri, 5 Jan 2024 23:47:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=dk/9wd6mk3XvZJWT8D4yhYy3MZa/HSdG4Hz96XTchxU=; b=CZ WJ+NS3JjiyZGK8T76F0FHD6IbqLXfW7zbXwuPixpQRzp+N9sYxVVJLVNafizcSX3 ak8M+IpPImgZMIL/344Eq+bM3CFo1eZIpuF7nk9Jgg7S4sAIwPeF7EE8O5W32He7 vCFNite6oVl9f2bn+Uw6QbeW1kf4XXV++K7FgurEkJvXHkEf+U9l30ctK+zl70RL fmuyb9iGkG1zNXUdntfj3geoxZKQxBk0TBil4qfVkJYb+2mE6USZbfrFtrPIcFAs 8c4xIqK7aEgY/AEPtAr6F9g/y0Q0Uz+hnUvql+Rw+rpwPgUL0dddBPOxSaYCJsMM lH0hpHA9JIqEEhj+moYw== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ve95utghp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jan 2024 23:47:22 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 405NkwMo026789 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2024 23:46:58 GMT Received: from [10.110.39.102] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 5 Jan 2024 15:46:57 -0800 Message-ID: Date: Fri, 5 Jan 2024 15:46:55 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] mm,page_alloc,cma: configurable CMA utilization Content-Language: en-US To: Minchan Kim , Chris Goldsworthy CC: Roman Gushchin , Andrew Morton , Rik van Riel , Roman Gushchin , Vlastimil Babka , Joonsoo Kim , Georgi Djakov , , References: <20230131071052.GB19285@hu-sbhattip-lv.qualcomm.com> <20230131201001.GA8585@hu-sbhattip-lv.qualcomm.com> <20230201040628.GA3767@hu-cgoldswo-sd.qualcomm.com> From: Sukadev Bhattiprolu In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: -c1JALMRyMNc0HBfXDpf2g4SW5q-enf8 X-Proofpoint-ORIG-GUID: -c1JALMRyMNc0HBfXDpf2g4SW5q-enf8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 mlxscore=0 phishscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxlogscore=439 suspectscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401050182 X-Rspamd-Queue-Id: 3691A4000D X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ud53xojdrbb74u9pscy9z8am737mbhku X-HE-Tag: 1704498449-496732 X-HE-Meta: U2FsdGVkX1+d3wmG5ue5PmELl3cBbuZO7aI9Q7AljprnH/mglj89roN/AqXppqECJnJ7f5T7rOnBmWDLGqy/mLLw6FjoRZ38Bi8FxQ3eTx6eWdp/TBeTP0AW7KqvvjcFQrMwA3AA2BDP+fZWqqZIMIh0AqH9jj8N5JYGgewXKr+yabLcGJ7o5kyBB8A8ZHUX77clz1qUFTcb7WSfjZ5SAixNEJhXwcamP2feFWGn2luC8A56PlGGDc0E6YRSkCelY42Ydyg1oajgwo6fXUp1i1CoKB2fZj04ss3V7HA6fV+gIEnb30hOtPUcRed1kC6NvzWAA6dSkejp2puYTplB52uEdyiLtDqsc1FmT/Dgdc97nTB96Fw/2cc2DY2kDbryK4viAQJn18Dn5TDaB641bvPA7PoTSOe5//Raxg51+Kri5abgU0ZaG5kLod6psDZAoMPjuEY2cNuZe+tFnPZm0bw8BLQcMQxQZffGqgu1zPqFLxMH3oZlFHHSd4fHmKcg109BPrVc7C4hy52g0157t3z5H1g/eaY2nbGBkqh8eBDFRKB4T9YUTgF1GnVyhs7n50To5gDg64DVrskOXs5sQlkRgv6oR9AHdJLZa+Hk3reviRW2tcuqgn60MBLLYYHKFLUpItJBZ3fZzwbU2VXgY15itdhEtIiqbAqOdfiwoN2sFWr0pAlWKWJf0F6fSgsZCONRdyEYYZ7Mq6OZZk2tWU+kerBaDBMVySkZOzBbBJ3JlBVxnhfXJteieDMk4K6qpklD5n3jOAdWNEK2mczLztssGwFed+uY62woZDMHb534+AN9qCUBF84KrzsI/C0mhnL2llU0aWPzq0ZVZJw0TTpZ9CNWalGVj6t3bJLKdAGx5q1Ix/qKlayD4F/cRlYH+E5Hbe8F2QE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2/1/2023 3:47 PM, Minchan Kim wrote: > > I like this patch for different reason but for the specific problem you > mentioned, How about making reclaimer/compaction aware of the problem: > > IOW, when the GFP_KERNEL/DMA allocation happens but not enough memory > in the zones, let's migrates movable pages in those zones into CMA > area/movable zone if they are plenty of free memory. Hi Minchan, Coming back to this thread after a while. If the CMA region is usually free, allocating pages first in the non-CMA region and then moving them into the CMA region would be extra work since it would happen most of the time. In such cases, wouldn't it be better to allocate from the CMA region itself? Sukadev