X-Received: by 2002:a17:90a:9204:b0:1b9:f22:e35e with SMTP id m4-20020a17090a920400b001b90f22e35emr2538013pjo.73.1645510138731; Mon, 21 Feb 2022 22:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645510138; cv=none; d=google.com; s=arc-20160816; b=NC1KqNg2UCxzwpKyZnKYqUoHv9t6g4xzR8R6INuwNRewR/sdZtnRzRoLMqZZZpWryS MdtkPd0+3Sg4E0uZLvSszRjpHmL9N8sIdb5ym1XKQcviJ8xEqzFMkFqruLNbm7gMp9FC sfIUN1vIcOjQkd5IgzMAmLOHtvJpZBmaDpDz1vm2IOD7rz1TK6yABgHZQS4cZbwgAUuW eDX6nD+lTVE982ypRO5Vl+aOaACsihkH9JpylzHZJsbflvqq21euE/kW29X1EVZ78sll PvQCK2y/DKSgud3D4FoQOXIKUyv8N+LBdyYs75fmeqFBSzuHPkRPwkcu4w559ASGGZpv Ipvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=BkIA/JWUizWaSzVXc+cHsIZabhRqa+eFVctIr/ke4+4=; b=GdmUKVmnOYqov0xwxY8d5kIUMEwrc6GWw/MPRj4yhRrl4qkmETsrfVB/vbubcn7N5f ESMTi3U4UoyU0SbKz8FRxjiABArFyqCIxXTHl3gsrUSm0oBAt0kjkgxBfMxMk3S6uDsi 7RyxbXue/m9dVqoIxlnDGCSyGcWTvlpzU15MHH1FevUoZXj4nDOq3vfTZL53/F5spoc5 5aYmZ87U86jmASzTmWZDtdWoP1dn4Iw7cr29qLaGNZD1N1J+kNxYnLFN04WrgXQGZSPH jTD586r6liUq9O/BJ8h9Y2oMdZ2vgNf8MYO9Jm9fISBgA8zmOudfm68aNtIZfu+e6tvG PAxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=R3k0izTI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o4si20117267pls.557.2022.02.21.22.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 22:08:58 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=R3k0izTI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4270E9969F; Mon, 21 Feb 2022 21:49:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbiBVFuH (ORCPT + 99 others); Tue, 22 Feb 2022 00:50:07 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:35872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbiBVFuG (ORCPT ); Tue, 22 Feb 2022 00:50:06 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2238A99684 for ; Mon, 21 Feb 2022 21:49:42 -0800 (PST) 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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