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 C4ABAC433EF for ; Tue, 22 Feb 2022 05:49:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 579C18D0007; Tue, 22 Feb 2022 00:49:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 501F88D0001; Tue, 22 Feb 2022 00:49:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37E0F8D0007; Tue, 22 Feb 2022 00:49:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 259728D0001 for ; Tue, 22 Feb 2022 00:49:43 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DBB81229B6 for ; Tue, 22 Feb 2022 05:49:42 +0000 (UTC) X-FDA: 79169339004.07.C258254 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf29.hostedemail.com (Postfix) with ESMTP id 3BB5F120002 for ; Tue, 22 Feb 2022 05:49:42 +0000 (UTC) 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 CEB862110A; Tue, 22 Feb 2022 05:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1645508980; 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=BkIA/JWUizWaSzVXc+cHsIZabhRqa+eFVctIr/ke4+4=; b=R3k0izTI0bNJdjiF/1ZSYa+oZ+a+OikZcLJbX7yrj72adA5ky67hHV9O1VRpvzRhat1GcA kn0fm56ZMcNUs/PGrdCzUAOu55LuiHxK8K+5RAq5yocWIkTFh7IdRHVMJnTZo8zkkj1+GZ UVGKh+zZuRsNq+jHw9L32ZWjC3NxW/g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1645508980; 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=BkIA/JWUizWaSzVXc+cHsIZabhRqa+eFVctIr/ke4+4=; b=HOBi92SPsQQ8U0fTCw11s8WfIt8wuJDN5CP77ZnNQXK/pfek+wN9PSOflpX1EJHIcoGvjP XPgUWeSzEYyk9rCw== 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 4578D13BB5; Tue, 22 Feb 2022 05:49:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KY5gDXR5FGK1BQAAMHmgww (envelope-from ); Tue, 22 Feb 2022 05:49:40 +0000 Date: Tue, 22 Feb 2022 06:49:38 +0100 From: Oscar Salvador To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , "Rafael J. Wysocki" , Greg Kroah-Hartman , Michal Hocko Subject: Re: [PATCH v1] drivers/base/memory: clarify adding and removing of memory blocks Message-ID: References: <20220221154531.11382-1-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220221154531.11382-1-david@redhat.com> X-Rspamd-Queue-Id: 3BB5F120002 X-Stat-Signature: ebfttz41h7ammkroeozq3eiqnwisrs3a X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=R3k0izTI; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=HOBi92SP; spf=pass (imf29.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-Rspamd-Server: rspam05 X-HE-Tag: 1645508982-440382 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, Feb 21, 2022 at 04:45:31PM +0100, David Hildenbrand wrote: > Let's make it clearer at which places we actually add and remove memory > blocks -- streamlining the terminology -- and highlight which memory > block start out online and which start out as offline. > > * rename add_memory_block -> add_boot_memory_block > * rename init_memory_block -> add_memory_block > * rename unregister_memory -> remove_memory_block > * rename register_memory -> __add_memory_block > * add add_hotplug_memory_block > * mark add_boot_memory_block with __init (suggested by Oscar) > > __add_memory_block() is a pure helper for add_memory_block(), remove > the somewhat obvious comment. > > Cc: Andrew Morton > Cc: "Rafael J. Wysocki" > Cc: Greg Kroah-Hartman > Cc: Michal Hocko > Cc: Oscar Salvador > Signed-off-by: David Hildenbrand Thanks for doing this, it makes the code much more clear. Reviewed-by: Oscar Salvador > --- > > Based on v5.17-rc5 and: > [PATCH v2 0/2] drivers/base/memory: determine and store zone for > single-zone memory blocks [1] Maybe just my thing, but I also had to pull in [1] in order to apply this error-free. [1] https://patchwork.kernel.org/project/linux-mm/patch/20220128144540.153902-1-david@redhat.com/ -- Oscar Salvador SUSE Labs