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 5BDD6C001DF for ; Thu, 3 Aug 2023 11:31:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B2A19280236; Thu, 3 Aug 2023 07:31:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB28628022C; Thu, 3 Aug 2023 07:31:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92C14280236; Thu, 3 Aug 2023 07:31:00 -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 801E728022C for ; Thu, 3 Aug 2023 07:31:00 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0EA7D810CD for ; Thu, 3 Aug 2023 11:31:00 +0000 (UTC) X-FDA: 81082576680.29.0A2F384 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf03.hostedemail.com (Postfix) with ESMTP id AEC812001B for ; Thu, 3 Aug 2023 11:30:56 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=PyYKaBLz; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf03.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 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=1691062256; 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=2YTQRuqkv53Z8DJYB9c+3+vV74A3jJ25NIxoPGrGH1I=; b=TJQvt9T4QT97xUgKYkfD6ZSYXa0GlmKwgQkkGNTZ9Rzm3AdVKfzVG9iuBo31nvJSDtGR82 nfmD4OlIoblLf8CNrp6uM5Kr7XWJOxYzEOdoObkTXOYPbwcqiLT+Tb8AAIQP9eLYCAbpwY nVWrg1z0OAISh2r0ZQb74UnibWw0vdY= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=PyYKaBLz; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf03.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691062257; a=rsa-sha256; cv=none; b=Qmzb3N/lVaf1hGpTJT7lnIk4Ujimci26KakaUQrCftsvfyVHrFPEntmn3k97kc5ZPvEKUs Oq+wq7t3BFLMRIVGMN3VVU4qiRo0kqPDkzuAKg3YC9Z84PX7yveiU14aWVFpa2dL9UjP/v LDqDIzkc8cHbOZhN+sfuI4ZfGMIVJX0= 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-out1.suse.de (Postfix) with ESMTPS id 0C279219AC; Thu, 3 Aug 2023 11:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1691062255; 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=2YTQRuqkv53Z8DJYB9c+3+vV74A3jJ25NIxoPGrGH1I=; b=PyYKaBLz1SEUTXpNmjBEtacozKZcMUFJawXf2mHZYHYa7ME722AbfYKNGKTqYzCoYAcB6w d8Xof9ygD0PzlGFppHEUvkhFRgj4arDISlGa9dsMScLMcFmisFt+seK5tAAo9ZN4XqdEOd 3ezC2W3CtuYw3VPpuK4k5gULoOSSeqk= 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 E1D361333C; Thu, 3 Aug 2023 11:30:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id V9kENO6Py2QkNAAAMHmgww (envelope-from ); Thu, 03 Aug 2023 11:30:54 +0000 Date: Thu, 3 Aug 2023 13:30:54 +0200 From: Michal Hocko To: David Hildenbrand Cc: 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, Oscar Salvador , Vishal Verma Subject: Re: [PATCH v7 7/7] mm/memory_hotplug: Enable runtime update of memmap_on_memory parameter Message-ID: References: <20230801044116.10674-8-aneesh.kumar@linux.ibm.com> <31305ab7-1e65-80aa-ee91-9190c8f67430@redhat.com> <1c6a74f0-85e9-5299-1520-9068e842b1a5@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c6a74f0-85e9-5299-1520-9068e842b1a5@redhat.com> X-Rspam-User: X-Stat-Signature: butuh77wdpf5ik3i4mj3b9atz17znzhe X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: AEC812001B X-HE-Tag: 1691062256-535033 X-HE-Meta: U2FsdGVkX18wmn3CR4Vnh6CnHeeH3EEUrZh55xQiQskDsFSwd6UjPaj+iU0hEcUKQulASbIch8JKx9qlsyj/0zGrzNjYglLKOVOb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J8ZwsItyGEDRc7Dq57 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 Thu 03-08-23 11:24:08, David Hildenbrand wrote: [...] > > would be readable only when the block is offline and it would reallocate > > vmemmap on the change. Makes sense? Are there any risks? Maybe pfn > > walkers? > > The question is: is it of any real value such that it would be worth the > cost and risk? > > > One of the primary reasons for memmap_on_memory is that *memory hotplug* > succeeds even in low-memory situations (including, low on ZONE_NORMAL > situations). One usecase I would have in mind is a mix of smaller and larger memory blocks. For larger ones you want to have memmap_on_memory in general because they do not eat memory from outside but small(er) ones might be more tricky because now you can add a lot of blocks that would be internally fragmented to prevent larger allocations to form. > So you want that behavior already when hotplugging such > devices. While there might be value to relocate it later, I'm not sure if > that is really worth it, and it does not solve the main use case. Is it worth it? TBH I am not sure same as I am not sure the global default should be writable after boot. If we want to make it more dynamic we should however talk about the proper layer this is implemented on. -- Michal Hocko SUSE Labs