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 B396DEB64DD for ; Wed, 12 Jul 2023 03:18:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 47E576B0083; Tue, 11 Jul 2023 23:18:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 42EB16B0085; Tue, 11 Jul 2023 23:18:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D0948D0001; Tue, 11 Jul 2023 23:18:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 1B4736B0083 for ; Tue, 11 Jul 2023 23:18:15 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EDA8712047E for ; Wed, 12 Jul 2023 03:18:14 +0000 (UTC) X-FDA: 81001501308.04.C687409 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf29.hostedemail.com (Postfix) with ESMTP id 2A52F120005 for ; Wed, 12 Jul 2023 03:18:11 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=dPaY6sZo; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf29.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689131892; a=rsa-sha256; cv=none; b=b9Fw9oqxooAFNS+Am5IKVqZYNJ0x8qOXhBAA2ZUud+iYdGb++I33+9woXk8yHwfz9vqTwu l2CoaGchn+56rzlj235MUl+YLKuRWIUpBQsvWYurmTeVV+POgdFpabHxT498Y4wusBoiKj od+tdm6gXmPouMe5w1ckh4joduDGhGI= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=dPaY6sZo; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf29.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689131892; 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=uz+vI2zlLMPqwhCHwBBm3a6AUVXD869bgFIxa5qoXhY=; b=sKHGoB9KRmCXlelc7DPrX6v+Hs+CO0tjL5JOGMeq45PxuHs9YHBKyvFFwLdVzTqmLTn7Kv 0AOoQUEoZc9LmcUYE05O5GzWkYFt1lwF2GsDHs1DkLfxG4/5TR501zywIMACTSOuy9UsgA samZM8EWvTs2phuOcTb1ObTCrKT5dtw= Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36C36TVv006134; Wed, 12 Jul 2023 03:18:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=uz+vI2zlLMPqwhCHwBBm3a6AUVXD869bgFIxa5qoXhY=; b=dPaY6sZofJ1TzrGm4S1P2ZVYr6BBoGU32ZnvfJ74J7s1feKPJTuzzQBaPp6i03VFejsx K1O+Nd6CEXjFNua7PYzjprEV4JpKkML6/Okb2zW78DEBuehkhchxxBn1X6G+C9oNBMUP vbYDFmK6dSTITEIGSxUpOrbE+HuAZWRCSKyTtETTsLBqFyx6JyoFALgrYN6F/Uql+9QH u/nILkfWEhaSliIrI939etq2vvhFmwfbp6/6JoR98n9/PgVaSDdibqRRX+ahhJjSNdmI I+GIK92bzLToG58ry7lMyT8DK46NYg7EQ23mBedWq9KXcLdjdwkuM5ajp3ojPV72zFvU /A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rskpp8fsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jul 2023 03:18:03 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36C36WVv006467; Wed, 12 Jul 2023 03:18:02 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rskpp8fqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jul 2023 03:18:02 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36C2sxVN025393; Wed, 12 Jul 2023 03:16:59 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3rpye59r00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jul 2023 03:16:59 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36C3Gvb454591752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jul 2023 03:16:57 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4916020049; Wed, 12 Jul 2023 03:16:57 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9934620040; Wed, 12 Jul 2023 03:16:54 +0000 (GMT) Received: from [9.43.19.28] (unknown [9.43.19.28]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 12 Jul 2023 03:16:54 +0000 (GMT) Message-ID: Date: Wed, 12 Jul 2023 08:46:53 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 4/7] mm/hotplug: Allow pageblock alignment via altmap reservation Content-Language: en-US To: David Hildenbrand , linux-mm@kvack.org, akpm@linux-foundation.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, christophe.leroy@csgroup.eu Cc: Oscar Salvador , Michal Hocko , Vishal Verma References: <20230711044834.72809-1-aneesh.kumar@linux.ibm.com> <20230711044834.72809-5-aneesh.kumar@linux.ibm.com> From: Aneesh Kumar K V In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: PlV2REpOD43DliAbdNhE8ampXrKu_A3q X-Proofpoint-GUID: UyW1V1lCTRxaFCT6siDIkjXKWpktBoJe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-11_14,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=769 clxscore=1015 suspectscore=0 impostorscore=0 mlxscore=0 phishscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307120025 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2A52F120005 X-Stat-Signature: xcnrzyibbmzif69p6a8wt4fbwqhs4xbw X-HE-Tag: 1689131891-76903 X-HE-Meta: U2FsdGVkX1+oN0ZWstWDgu+q6YmOaMA+jP7lOjoBydWJ3l7zgpVcvY0nHj/cf70fMgBgfFZ+1yJsyjqcScSKdRW/pYkUuAy9Ejz0L8G4TDrTZ6IsbqsLF0c/M5L//2gbgMSTkKOpy3zYy4B8fcGNerR7dj1i4thONEtF6tGTySkriB2GR4wLsKoVKxEXHTHenYjPk2TaPuZIsjbidYvoAr7NcHdC/GF90N2q2JFeDGQ07P/qmA/ihlerhKLa4gehamX26j9WSkmeIH4bUvZdKbV+M+J6WLnQ6uDgeCINt4eIFjWwdJkE7TwZjjVXbDjTwgLA+ZG7PRUAYaN8oGv00RI91iksqqI70pJhrC9q1TlcDS7LXFDnLwBSI3gvHq/cmtSTvFL+njmx0w/rqh5lGDq735Y6c6J7UG7Eao+FuWuFYm1fHBAml2LNkY7PPbDCpcijFBkl5nBAmMZcf1NdCPJ6vAgF/q4LgZEFa58hPkT9sjr3HrHbA8NCSyjop45+reJfKMadQf7VWtwTs0j5U1GazX45qz7+un03HXFnCZQaOEPb8wiBeJotvox8SjPdQ4E9Fcu84EgKHEP4j+2mN9b2tW8rTU2b61odzzmPJBEzXrqtbqfkL84gfXX0ctSVo2PhVcVYHoJseeDiLpUBWX5W0235VAZRJc3NWwhWnpoLkVcEjtnVNJ0JjHnD28oiMem0QRCbsHGCMA+QhUOmbzqULdby5FTrP6dKyGdot6N+A2IJ0W9FPW/luuamK/SC2za2qY4GuVe26nRtOXTnSUTIMsjPNwiEQD5S6GrIWZ5mfQQJgMFq/ubrTZCPfakDN0VtGOEoCzP3RqXDXbplqGzgkPMmBs+ujUbbE9deacgZ8/qF+iyda+7m9q7PiwIZR6OGWJ02pAObvGvxdYfxEtdYsuEhIK198bDWlj8WP7RWZ2BVAvMIxK+QVgj+NSXcxc0EmUXoFucO/jd9ml/ Swrr/T/m KeDNOdyQ4iwzDlTJ3r4uZTzHbzuA0bzbVmKM1G58DZyAXFGibYyRicl+q1m8XusEPn8KK7WPsyGQ/VyJsZUqq6+ZtIdmNuSQGUO7TlkZzJjCcL57LDQCYJlNcR6xc8L7+evp1 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 7/11/23 10:49 PM, David Hildenbrand wrote: > On 11.07.23 06:48, Aneesh Kumar K.V wrote: >> Add a new kconfig option that can be selected if we want to allow >> pageblock alignment by reserving pages in the vmemmap altmap area. >> This implies we will be reserving some pages for every memoryblock >> This also allows the memmap on memory feature to be widely useful >> with different memory block size values. > > "reserving pages" is a nice way of saying "wasting memory". :) Let's spell that out. > > I think we have to find a better name for this, and I think we should have a toggle similar to memory_hotplug.memmap_on_memory. This should be an admin decision, not some kernel config option. > > > memory_hotplug.force_memmap_on_memory > > "Enable the memmap on memory feature even if it could result in memory waste due to memmap size limitations. For example, if the memmap for a memory block requires 1 MiB, but the pageblock size is 2 MiB, 1 MiB > of hotplugged memory will be wasted. Note that there are still cases where the feature cannot be enforced: for example, if the memmap is smaller than a single page, or if the architecture does not support the forced mode in all configurations." > > Thoughts? > With module parameter, do we still need the Kconfig option? -aneesh