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 D5CB5C04FE1 for ; Tue, 1 Aug 2023 09:07:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 694E0900007; Tue, 1 Aug 2023 05:07:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 645DE8E0002; Tue, 1 Aug 2023 05:07:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53519900007; Tue, 1 Aug 2023 05:07:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 421A78E0002 for ; Tue, 1 Aug 2023 05:07:14 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 01F5B40B2A for ; Tue, 1 Aug 2023 09:07:13 +0000 (UTC) X-FDA: 81074956788.24.9281AD9 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf22.hostedemail.com (Postfix) with ESMTP id E7511C0020 for ; Tue, 1 Aug 2023 09:07:11 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=FP91dO9c; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf22.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690880832; 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=NOIQpsYorsEErSCKvrBUT+6FC1vs4HhE6rpSdG0vcy4=; b=HcYNuw8dPRAK4Qcuv9ZEF/oaOs71L0yE+eQT+Wg09yUlf4wcrme8UBOviRmFnRl2cJapZJ TS99Nne3I4UzSPO2Nu82OOJTbTWEjpAZmm0GSvtd5beoW19QqnaiG6XYYeFDw7LXROg3XE VlLonHdEDzFzQO3I0Lo2zZtC20aLLx8= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=FP91dO9c; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf22.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690880832; a=rsa-sha256; cv=none; b=zis8DC2E5ClldCWIL10k926nNlR668b602SiMI+coAQQPGvzj2bJub9ERW8nNWEEXI6UJO MFk3BvXt5YJh+0RH/8KOqqi5T5+qw3D6TtuNCcZ0LiMBjO7F5DJr5aQVFeJceQxLTiLZ6j 3OGInIuPSuO/1aD+5Va/cGn6ohyG27E= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5E3C01F8A4; Tue, 1 Aug 2023 09:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1690880830; h=from:from:reply-to: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=NOIQpsYorsEErSCKvrBUT+6FC1vs4HhE6rpSdG0vcy4=; b=FP91dO9cgibLCZDlgsJ4DyBjauNOAQBKM3RwdkBYwUh4hUy7eRUZB4CvgSvULorwq5IBMU kWyhma9WsPrqDfJ13ACJmvRzRYXI9UDmQdAalWD5tVZ7I47VF8L7rCOuBddztpmZQ5S7yW PC5sthVDcDoQiC+9OFXwfcrcWDmZlaI= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4F1EC13919; Tue, 1 Aug 2023 09:07:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qWl8Ej7LyGS7OAAAMHmgww (envelope-from ); Tue, 01 Aug 2023 09:07:10 +0000 Date: Tue, 1 Aug 2023 11:07:09 +0200 From: Michal Hocko To: "Aneesh Kumar K.V" Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, christophe.leroy@csgroup.eu, Oscar Salvador , David Hildenbrand , Vishal Verma Subject: Re: [PATCH v7 0/7] Add support for memmap on memory feature on ppc64 Message-ID: References: <20230801044116.10674-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230801044116.10674-1-aneesh.kumar@linux.ibm.com> X-Rspamd-Queue-Id: E7511C0020 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ngxp1jagiozwiudw757otsgafnunu5hn X-HE-Tag: 1690880831-387337 X-HE-Meta: U2FsdGVkX19/YTn5xbWK6pqOcSsA321d4hSVe/b0FicQqb8fPImbFujLT9iDsMqa1fchiZz8Ul7c6Fh1M1vz/OavuOK+NXtbtPGYhNOyG2PiBwi3IWejsvH3F7ka1EO8qIPLrmnOIw874eDrZSJ++3M87nvrYybKhqDH1rrjDEZ1GBXxvw4dbkSsTpt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dyN2 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: I cannot really judge the ppc specific part but other patches seem reasonable. Patch 4 could print a more useful information about the wastage but this is nothing really earth shattering. I am not sure about the last patch which makes the on-memory property dynamic. This needs much more justification and use case description IMHO. That being said for patches 1 - 4 and 6 feel free to add Acked-by: Michal Hocko On Tue 01-08-23 10:11:09, Aneesh Kumar K.V wrote: > This patch series update memmap on memory feature to fall back to > memmap allocation outside the memory block if the alignment rules are > not met. This makes the feature more useful on architectures like > ppc64 where alignment rules are different with 64K page size. > > This patch series is dependent on dax vmemmap optimization series > posted here > https://lore.kernel.org/linux-mm/20230718022934.90447-1-aneesh.kumar@linux.ibm.com/ > > Changes from v6: > * Update comments in the code > * Update commit message for patch 7 > > Changes from v5: > * Update commit message > * Move memory alloc/free to the callers in patch 6 > * Address review feedback w.r.t patch 4 > > Changes from v4: > * Use altmap.free instead of altmap.reserve > * Address review feedback > > Changes from v3: > * Extend the module parameter memmap_on_memory to force allocation even > though we can waste hotplug memory. > > Changes from v2: > * Rebase to latest linus tree > * Redo the series based on review feedback. Multiple changes to the patchset. > > Changes from v1: > * update the memblock to store vmemmap_altmap details. This is required > so that when we remove the memory we can find the altmap details which > is needed on some architectures. > * rebase to latest linus tree > > > > Aneesh Kumar K.V (7): > mm/memory_hotplug: Simplify ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE kconfig > mm/memory_hotplug: Allow memmap on memory hotplug request to fallback > mm/memory_hotplug: Allow architecture to override memmap on memory > support check > mm/memory_hotplug: Support memmap_on_memory when memmap is not aligned > to pageblocks > powerpc/book3s64/memhotplug: Enable memmap on memory for radix > mm/memory_hotplug: Embed vmem_altmap details in memory block > mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter > > .../admin-guide/mm/memory-hotplug.rst | 12 + > arch/arm64/Kconfig | 4 +- > arch/powerpc/Kconfig | 1 + > arch/powerpc/include/asm/pgtable.h | 21 ++ > .../platforms/pseries/hotplug-memory.c | 2 +- > arch/x86/Kconfig | 4 +- > drivers/acpi/acpi_memhotplug.c | 3 +- > drivers/base/memory.c | 27 ++- > include/linux/memory.h | 8 +- > include/linux/memory_hotplug.h | 3 +- > mm/Kconfig | 3 + > mm/memory_hotplug.c | 205 ++++++++++++++---- > 12 files changed, 220 insertions(+), 73 deletions(-) > > -- > 2.41.0 -- Michal Hocko SUSE Labs