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 6B4A7EB64DA for ; Wed, 12 Jul 2023 07:23:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB18B6B0071; Wed, 12 Jul 2023 03:23:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A614D6B0072; Wed, 12 Jul 2023 03:23:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 928D26B0075; Wed, 12 Jul 2023 03:23:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 84FB26B0071 for ; Wed, 12 Jul 2023 03:23:04 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4260016017D for ; Wed, 12 Jul 2023 07:23:04 +0000 (UTC) X-FDA: 81002118288.22.AD390A2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 0A1471C001E for ; Wed, 12 Jul 2023 07:23:01 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hxINpudt; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf21.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689146582; a=rsa-sha256; cv=none; b=l6Pc0TTMVByZRnAbHQLTiIVfKFHvW4SmYAOaj7Vm+oGqQyFRnoGQzMHC4cQVKLfPJbvvx9 A9U2PDzvObk06dorWyJleRqDZSpH4v+ggaRAlPwE2hrz7bM7Qc8vW76uDWyLYH539DklAu M7iBVsrVOtP4i5gH6uwk0mMey7NiORM= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hxINpudt; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf21.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689146582; 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=EeR3QS0to/DqY2bB2MsY9aijuKAPyyHA7YBvuvP948Y=; b=uNrUXqAA88/I4kDNdNfkv1xuKrQozMZcb1ZTXDZzaXVVM+0N7BvqfHocUHWHvr5r76loEP p3GSyNARE1bEer3Hw1lt0J+czKU4g7PuC81PtNpmQo0G4uskoyN83FX9V9pfAE+JFBvxkA VXgJWCBUMNo4vBtYtt8qwahvWakTsho= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689146581; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EeR3QS0to/DqY2bB2MsY9aijuKAPyyHA7YBvuvP948Y=; b=hxINpudteX50rybup4QpUqNOEHTofMAPgqBJAWF4qEnFEyV0zWGOGiePpuvdOdRlSKvLzW lbbXIObdPFpbRAWNvq8LbA0o0u+5whHJVcCoRh/NWDHf7kPEzgBaNm4/wnFye+CEd3wCGx pMP2GgDRN6yuNr9Q97BiNoizsWy0onA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-371-LnuDOJP5OICumR9DfnppXQ-1; Wed, 12 Jul 2023 03:22:59 -0400 X-MC-Unique: LnuDOJP5OICumR9DfnppXQ-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3fa8cd898e0so44676625e9.3 for ; Wed, 12 Jul 2023 00:22:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689146578; x=1691738578; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EeR3QS0to/DqY2bB2MsY9aijuKAPyyHA7YBvuvP948Y=; b=Vm4Ri0CimI+CggfAAWgosh9qMV0rSWzYTAhYbmX6Lyb52Opb/GQGZGr17kLY8oZyFS kVz0SGvbVY/ARf6rQz/A5UEGtL2R1J3aZPSFRc/yfWeP9xExAAGBD2oZMiwmR9DmtRYf LQZWbdK/UAR2+tpSLEybMCLk/Lqc2Cym9OFr4V7gXh/IjGxBVqGPvXYT8zDIJLvrtAK3 LZYKLg95Xcpa426fVMYxEu1F0Yieo8BvYLyylyPF1CQrbrqUexkVJnCqm4hlXCxndb27 mMK+bdyFxpPeP+GO6gM2TNMsjoLWxHzseIF5+1Mq+S2q0nLyoIuXdYN850gUGeD6EggH 2dIQ== X-Gm-Message-State: ABy/qLZmOfgHKFG7I+/73LJAFCB0J+ErkDMjQm/brqwI07J7EkUJZ+um VVvuYJwzHrtEplmkKOyhYl9+i9vRmm0sPhrL7utEhjJNraLnk77CR46qiHHIpT3agE6sifnKejQ 4B2h+q6fwZQI= X-Received: by 2002:adf:fb01:0:b0:315:96ca:dcab with SMTP id c1-20020adffb01000000b0031596cadcabmr9622412wrr.35.1689146578411; Wed, 12 Jul 2023 00:22:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGomYcWQ/XjYm7yp82hAebaVhQCX5yL7rEd66/QkdDzyKYkyHxNEVV3WcmmW7loEO8e5SBIQQ== X-Received: by 2002:adf:fb01:0:b0:315:96ca:dcab with SMTP id c1-20020adffb01000000b0031596cadcabmr9622388wrr.35.1689146578042; Wed, 12 Jul 2023 00:22:58 -0700 (PDT) Received: from ?IPV6:2003:cb:c707:3700:3eea:ace6:5bde:4478? (p200300cbc70737003eeaace65bde4478.dip0.t-ipconnect.de. [2003:cb:c707:3700:3eea:ace6:5bde:4478]) by smtp.gmail.com with ESMTPSA id p4-20020a5d4e04000000b00313de682eb3sm4200483wrt.65.2023.07.12.00.22.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jul 2023 00:22:57 -0700 (PDT) Message-ID: <57dd0568-ee56-ff8d-3ba3-a9089a2ab386@redhat.com> Date: Wed, 12 Jul 2023 09:22:56 +0200 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 To: Aneesh Kumar K V , 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: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0A1471C001E X-Stat-Signature: 3bsqkyu9bn9jujjcpgqezzf34pm4rkuq X-HE-Tag: 1689146581-607270 X-HE-Meta: U2Fs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DUNHaGz/S+jlX/trJdSbRSQnAWeRr+slM82d/Kk2FMglbMhB5NEm5n75nZTh49BItLa3mXk8yozLlNI0/ZWXC8i1lgnOjRGViPMFNbxo9MyiB2VuJSIpkiTBZCogDMpD7pADlk0EPZ3olssnTN7CZagK3kSgN8givpAqcHFAY+nPrxa8OZcWeXpQ2itU00vYrQNsLlEx4KUgOEDIcTk04PiEJdXbKFwQgn0ovwr8G+KR9PHNxFf2lFo8KLpeZY1/MaVpcz+F4Ea8envQBeFq8Mex4H/rqk7ra/apN67Fg/0Ruu1Uz 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 12.07.23 05:16, Aneesh Kumar K V wrote: > 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? No. Sleeping over this, maybe we can convert the existing memory_hotplug.memmap_on_memory parameter to also accept "force". -- Cheers, David / dhildenb