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 6D360C636CC for ; Tue, 31 Jan 2023 18:11:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF0936B0074; Tue, 31 Jan 2023 13:11:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C9FB66B0075; Tue, 31 Jan 2023 13:11:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B679A6B007D; Tue, 31 Jan 2023 13:11:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A32CB6B0074 for ; Tue, 31 Jan 2023 13:11:04 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7BCD780BEE for ; Tue, 31 Jan 2023 18:11:04 +0000 (UTC) X-FDA: 80415885648.15.CDCADE4 Received: from out-216.mta1.migadu.com (out-216.mta1.migadu.com [95.215.58.216]) by imf27.hostedemail.com (Postfix) with ESMTP id 772754000F for ; Tue, 31 Jan 2023 18:11:02 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="o//e0VSs"; spf=pass (imf27.hostedemail.com: domain of roman.gushchin@linux.dev designates 95.215.58.216 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675188662; a=rsa-sha256; cv=none; b=q/0vvmclJLNvIPzvNnTi41seDgWvnKoB7eTXgC3HEg3mC74Cn/jRBInAJAjDI3OvaL3t8w jnrjgKTURl/GLsWJs75/E/R8G7uWg7Ow3PbiFRM8xhBVpiG7m/pRc5MOw09Q4epcKaSWGV /feorAo78+78RELYz9ImS5h64oTAJ94= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="o//e0VSs"; spf=pass (imf27.hostedemail.com: domain of roman.gushchin@linux.dev designates 95.215.58.216 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675188662; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Hw7RiQTVcA+BYuGPkYm03KZ1UUjvdwwinv6Or2lFo2Q=; b=M1gnOvzoOxe7hnp6Wlbzzw/TdxzoHGABbrT8b6eKonUi8bUlVNjzAPfojBBKsKsGUp72XE b4i2VdeicJ6hfNN1QCeI7vggxU4uwitJJQEbrf9M11ivKq3oI6rjmbJKybSWKDLA6dtpnO t2ZTfhDp3LcoBlFUdgjGNuCYGmUqj94= Date: Tue, 31 Jan 2023 10:10:40 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675188659; 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=Hw7RiQTVcA+BYuGPkYm03KZ1UUjvdwwinv6Or2lFo2Q=; b=o//e0VSsxl3FvJhusZSmKJQCUTa+TY6jePLCLBd91G6/UWzBx+tf3SG7yfMYK3jbGvyHM5 LfRL+mZGdqJZXp7EExIdq8UvyT897kM80w9xfpxmC4O4wkwELl9a0qOKwIHrBhMC6RClbM PSS76lHbnYrs4CKiZZ84XDub/33S7u4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Sukadev Bhattiprolu Cc: Andrew Morton , Rik van Riel , Roman Gushchin , Vlastimil Babka , Joonsoo Kim , Minchan Kim , Chris Goldsworthy , Georgi Djakov , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm,page_alloc,cma: configurable CMA utilization Message-ID: References: <20230131071052.GB19285@hu-sbhattip-lv.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230131071052.GB19285@hu-sbhattip-lv.qualcomm.com> X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Queue-Id: 772754000F X-Rspamd-Server: rspam01 X-Stat-Signature: 3ga996j7wscgwsgdqg515wh49wjqcti9 X-HE-Tag: 1675188662-302612 X-HE-Meta: U2FsdGVkX1+PIPXgi04zDtG7HZSoVAHklj0ZpFa+3XepgbbldSToZLOh/8wTLB8PDh4AAXT+L5d/rFC2BoHYEpYvy0+07dKnJMxFfGuqXqBinuYHkrTV5yA3EqrurUaZsDRAtf6JH9InWogVdhCfPqrcrXQlbbUxX8MjQaioE+8QfJFEGXgf8L2LgjHatmCU9QOuKs3mCcePKEbvXGkiZy+scI98FDCFZ+ZkDKKScsNgb6JSnVnxWxeSautlOq4rGXS4nOnXadx5Exdag0YppJlmSJZjVmut3G173kGw59N4uS0ABbw/D5DUxEACbW0Y4XC1H2gNYuOeRIEID+qIBhVL47+QAsXp5UbBBV7gt9+olvvlEV/NPmXRaVRgofAtp7YnDg3WRsaPuzHOqu6wzUvG6rlsZwqNFYOb/2PJB6Jcjsh/m5+DVRNWqtRq2QrYVik7PIKbu15/yzKlYSOuIW48SPPg6bvNZJwGFt4DZXEMDo9cGkdtqGH/Ih2Ik5DHh9OodqLZa84i6AdmhCqYbYpRWbquTtZvQFUOKDCanKtfG5bRI7iHsUhvnZETVPufOQQDghEh/RdXJkTzESZxP2mwKopmseNyxwvvsTH9e3+rLlExeTthmtGou6HjvZzunBlgjdM0lFMy3wG+D7ZItc/VDs5dw4ovN1CUutzO90l9tblyaBpK5rgIIJHj0j/j2Oa7z33RnG4nDdWOBuOthyVq6DLAt81/r9u8KDefoYvEZGizyJjaJbanCWCgl6T+oFhslvCUi9JsohhHmkIq8RNvmjEhXEhZwHXyvePgoAwGlrDeh2j7kw4WhdJhhj2r6aD/TbukDrcVczsmasTxi4l+cU4PV4krCwGePcwv+TouEdM8SWOjnzMdEX8pxYVM8I9T8ZEjzkMtGHS8Ph4Ss9SE849gNp7J0Sz07cALKu2rtCGBZfcH5Atp0mYPr+KR8DYJo2LWbi7uK2htkP7 M1y4P9bR D+BiOYBY+nZzD/Q72tTGLR2L+HSNXkvZm8nIVWyeADkS+Rr0yq8Oq7uMjOYMYoF0gxsWbMXsJfM/7HULegvIepR2euIsfemh0TSEPesXktn11juP6l/EJ/J7QBHzp2iXTfKa9dyaZ0gBZF2iToCHYqIVt0nwKGviH3Qeg4mcFfnU1os+lU9psGmmjOTVLDtLTv11YAOJng8jjpLqZbnsFYQjNTTSI3pVGANBLO5npXFpICVFWV8o+7/sFRqR6WLFGXXrfjGbEqJ5WiQv26VWZGRibSBV8HTt4nGwah+NLyu5/f/eCpOKkjeLeWw== 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: On Mon, Jan 30, 2023 at 11:10:52PM -0800, Sukadev Bhattiprolu wrote: > > Commit 16867664936e ("mm,page_alloc,cma: conditionally prefer cma pageblocks for movable allocations") > added support to use CMA pages when more than 50% of total free pages in > the zone are free CMA pages. > > However, with multiplatform kernels a single binary is used across different > targets of varying memory sizes. A low memory target using one such kernel > would incur allocation failures even when sufficient memory is available in > the CMA region. On these targets we would want to utilize a higher percentage > of the CMA region and reduce the allocation failures, even if it means that a > subsequent cma_alloc() would take longer. > > Make the percentage of CMA utilization a configurable parameter to allow > for such usecases. > > Signed-off-by: Sukadev Bhattiprolu > --- > Note: There was a mention about it being the last resort to making this > percentage configurable (https://lkml.org/lkml/2020/3/12/751). But > as explained above, multi-platform kernels for varying memory size > targets would need this to be configurable. Hi Sukadev! Can you, please, share a bit more details about your setup? E.g. what is the zone size, the cma area size and the value you want to set your sysctl to? Roman