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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E39C0C433F5 for ; Thu, 7 Oct 2021 09:13:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C82860FC3 for ; Thu, 7 Oct 2021 09:13:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7C82860FC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id ED8396B006C; Thu, 7 Oct 2021 05:13:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E88A16B0071; Thu, 7 Oct 2021 05:13:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D77266B0073; Thu, 7 Oct 2021 05:13:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id C6E036B006C for ; Thu, 7 Oct 2021 05:13:24 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7E4AC180889AF for ; Thu, 7 Oct 2021 09:13:24 +0000 (UTC) X-FDA: 78669077928.04.153A496 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf08.hostedemail.com (Postfix) with ESMTP id D780B3001406 for ; Thu, 7 Oct 2021 09:13:23 +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 98A6F225D0; Thu, 7 Oct 2021 09:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1633598002; h=from:from:reply-to: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=VzS0tkOtXPnUweK9gUuFI76p1jCgE7wRtX51d/k/4t4=; b=XZZ+FoLGvsvaSUO2b/CRuKch18XW0AAxTewiLtI56ErMmkWUZew4Aeztwx9suKcUQG5qCK /4WXOFljMGj7FyWyvZNQRV3hhUfKHHCjyG/T4KFGVpW9DPHHhYOvqQp0MJVGX14sSaIJgK Qqqy4CA3Yu1OP8lRs0fnJ1ZJx/8P2ng= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1633598002; h=from:from:reply-to: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=VzS0tkOtXPnUweK9gUuFI76p1jCgE7wRtX51d/k/4t4=; b=ABnljxMdiFjR2q8gMpVu0Kzb9YYf5zH3/WXV5EOWZlrsnKCRdkqGiWxUL9mWKNurYS1n/P L8hiSSExRM9GanBQ== 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 11BEC13A98; Thu, 7 Oct 2021 09:13:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bPeNATG6XmFeLQAAMHmgww (envelope-from ); Thu, 07 Oct 2021 09:13:21 +0000 Date: Thu, 7 Oct 2021 11:13:19 +0200 From: Oscar Salvador To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, Andrew Morton , Jonathan Corbet , Alex Shi , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Greg Kroah-Hartman , "Rafael J. Wysocki" , "Michael S. Tsirkin" , Jason Wang , Shuah Khan , Michal Hocko , Mike Rapoport , x86@kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v1 4/6] mm/memory_hotplug: remove HIGHMEM leftovers Message-ID: References: <20210929143600.49379-1-david@redhat.com> <20210929143600.49379-5-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210929143600.49379-5-david@redhat.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: D780B3001406 X-Stat-Signature: 7bk6xzqgse7fxccdm31bqa7rdyjpmh1h Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=XZZ+FoLG; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=ABnljxMd; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf08.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de X-HE-Tag: 1633598003-515547 Content-Transfer-Encoding: quoted-printable 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 Wed, Sep 29, 2021 at 04:35:58PM +0200, David Hildenbrand wrote: > We don't support CONFIG_MEMORY_HOTPLUG on 32 bit and consequently not > HIGHMEM. Let's remove any leftover code -- including the unused > "status_change_nid_high" field part of the memory notifier. >=20 > Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador > --- > Documentation/core-api/memory-hotplug.rst | 3 -- > .../zh_CN/core-api/memory-hotplug.rst | 4 --- > include/linux/memory.h | 1 - > mm/memory_hotplug.c | 36 ++----------------- > 4 files changed, 2 insertions(+), 42 deletions(-) >=20 > diff --git a/Documentation/core-api/memory-hotplug.rst b/Documentation/= core-api/memory-hotplug.rst > index de7467e48067..682259ee633a 100644 > --- a/Documentation/core-api/memory-hotplug.rst > +++ b/Documentation/core-api/memory-hotplug.rst > @@ -57,7 +57,6 @@ The third argument (arg) passes a pointer of struct m= emory_notify:: > unsigned long start_pfn; > unsigned long nr_pages; > int status_change_nid_normal; > - int status_change_nid_high; > int status_change_nid; > } > =20 > @@ -65,8 +64,6 @@ The third argument (arg) passes a pointer of struct m= emory_notify:: > - nr_pages is # of pages of online/offline memory. > - status_change_nid_normal is set node id when N_NORMAL_MEMORY of node= mask > is (will be) set/clear, if this is -1, then nodemask status is not c= hanged. > -- status_change_nid_high is set node id when N_HIGH_MEMORY of nodemask > - is (will be) set/clear, if this is -1, then nodemask status is not c= hanged. > - status_change_nid is set node id when N_MEMORY of nodemask is (will = be) > set/clear. It means a new(memoryless) node gets new memory by online= and a > node loses all memory. If this is -1, then nodemask status is not ch= anged. > diff --git a/Documentation/translations/zh_CN/core-api/memory-hotplug.r= st b/Documentation/translations/zh_CN/core-api/memory-hotplug.rst > index 161f4d2c18cc..9a204eb196f2 100644 > --- a/Documentation/translations/zh_CN/core-api/memory-hotplug.rst > +++ b/Documentation/translations/zh_CN/core-api/memory-hotplug.rst > @@ -63,7 +63,6 @@ memory_notify=E7=BB=93=E6=9E=84=E4=BD=93=E7=9A=84=E6=8C= =87=E9=92=88:: > unsigned long start_pfn; > unsigned long nr_pages; > int status_change_nid_normal; > - int status_change_nid_high; > int status_change_nid; > } > =20 > @@ -74,9 +73,6 @@ memory_notify=E7=BB=93=E6=9E=84=E4=BD=93=E7=9A=84=E6=8C= =87=E9=92=88:: > - status_change_nid_normal=E6=98=AF=E5=BD=93nodemask=E7=9A=84N_NORMAL_= MEMORY=E8=A2=AB=E8=AE=BE=E7=BD=AE/=E6=B8=85=E9=99=A4=E6=97=B6=E8=AE=BE=E7= =BD=AE=E8=8A=82 > =E7=82=B9id=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=98=AF-1=EF=BC=8C=E5=88=99n= odemask=E7=8A=B6=E6=80=81=E4=B8=8D=E6=94=B9=E5=8F=98=E3=80=82 > =20 > -- status_change_nid_high=E6=98=AF=E5=BD=93nodemask=E7=9A=84N_HIGH_MEMO= RY=E8=A2=AB=E8=AE=BE=E7=BD=AE/=E6=B8=85=E9=99=A4=E6=97=B6=E8=AE=BE=E7=BD=AE= =E7=9A=84=E8=8A=82=E7=82=B9 > - id=EF=BC=8C=E5=A6=82=E6=9E=9C=E8=BF=99=E4=B8=AA=E5=80=BC=E4=B8=BA-1=EF= =BC=8C=E9=82=A3=E4=B9=88nodemask=E7=8A=B6=E6=80=81=E4=B8=8D=E4=BC=9A=E6=94= =B9=E5=8F=98=E3=80=82 > - > - status_change_nid=E6=98=AF=E5=BD=93nodemask=E7=9A=84N_MEMORY=E8=A2=AB= =EF=BC=88=E5=B0=86=EF=BC=89=E8=AE=BE=E7=BD=AE/=E6=B8=85=E9=99=A4=E6=97=B6= =E8=AE=BE=E7=BD=AE=E7=9A=84=E8=8A=82=E7=82=B9id=E3=80=82=E8=BF=99 > =E6=84=8F=E5=91=B3=E7=9D=80=E4=B8=80=E4=B8=AA=E6=96=B0=E7=9A=84=EF=BC= =88=E6=B2=A1=E4=B8=8A=E7=BA=BF=E7=9A=84=EF=BC=89=E8=8A=82=E7=82=B9=E9=80=9A= =E8=BF=87=E8=81=94=E6=9C=BA=E8=8E=B7=E5=BE=97=E6=96=B0=E7=9A=84=E5=86=85=E5= =AD=98=EF=BC=8C=E8=80=8C=E4=B8=80=E4=B8=AA=E8=8A=82=E7=82=B9=E5=A4=B1=E5=8E= =BB=E4=BA=86=E6=89=80=E6=9C=89=E7=9A=84=E5=86=85 > =E5=AD=98=E3=80=82=E5=A6=82=E6=9E=9C=E8=BF=99=E4=B8=AA=E5=80=BC=E4=B8= =BA-1=EF=BC=8C=E9=82=A3=E4=B9=88nodemask=E7=9A=84=E7=8A=B6=E6=80=81=E5=B0= =B1=E4=B8=8D=E4=BC=9A=E6=94=B9=E5=8F=98=E3=80=82 > diff --git a/include/linux/memory.h b/include/linux/memory.h > index dd6e608c3e0b..c46ff374d48d 100644 > --- a/include/linux/memory.h > +++ b/include/linux/memory.h > @@ -96,7 +96,6 @@ struct memory_notify { > unsigned long start_pfn; > unsigned long nr_pages; > int status_change_nid_normal; > - int status_change_nid_high; > int status_change_nid; > }; > =20 > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 8d7b2b593a26..95c927c8bfb8 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -21,7 +21,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -585,10 +584,6 @@ void generic_online_page(struct page *page, unsign= ed int order) > debug_pagealloc_map_pages(page, 1 << order); > __free_pages_core(page, order); > totalram_pages_add(1UL << order); > -#ifdef CONFIG_HIGHMEM > - if (PageHighMem(page)) > - totalhigh_pages_add(1UL << order); > -#endif > } > EXPORT_SYMBOL_GPL(generic_online_page); > =20 > @@ -625,16 +620,11 @@ static void node_states_check_changes_online(unsi= gned long nr_pages, > =20 > arg->status_change_nid =3D NUMA_NO_NODE; > arg->status_change_nid_normal =3D NUMA_NO_NODE; > - arg->status_change_nid_high =3D NUMA_NO_NODE; > =20 > if (!node_state(nid, N_MEMORY)) > arg->status_change_nid =3D nid; > if (zone_idx(zone) <=3D ZONE_NORMAL && !node_state(nid, N_NORMAL_MEMO= RY)) > arg->status_change_nid_normal =3D nid; > -#ifdef CONFIG_HIGHMEM > - if (zone_idx(zone) <=3D ZONE_HIGHMEM && !node_state(nid, N_HIGH_MEMOR= Y)) > - arg->status_change_nid_high =3D nid; > -#endif > } > =20 > static void node_states_set_node(int node, struct memory_notify *arg) > @@ -642,9 +632,6 @@ static void node_states_set_node(int node, struct m= emory_notify *arg) > if (arg->status_change_nid_normal >=3D 0) > node_set_state(node, N_NORMAL_MEMORY); > =20 > - if (arg->status_change_nid_high >=3D 0) > - node_set_state(node, N_HIGH_MEMORY); > - > if (arg->status_change_nid >=3D 0) > node_set_state(node, N_MEMORY); > } > @@ -1801,7 +1788,6 @@ static void node_states_check_changes_offline(uns= igned long nr_pages, > =20 > arg->status_change_nid =3D NUMA_NO_NODE; > arg->status_change_nid_normal =3D NUMA_NO_NODE; > - arg->status_change_nid_high =3D NUMA_NO_NODE; > =20 > /* > * Check whether node_states[N_NORMAL_MEMORY] will be changed. > @@ -1816,24 +1802,9 @@ static void node_states_check_changes_offline(un= signed long nr_pages, > if (zone_idx(zone) <=3D ZONE_NORMAL && nr_pages >=3D present_pages) > arg->status_change_nid_normal =3D zone_to_nid(zone); > =20 > -#ifdef CONFIG_HIGHMEM > - /* > - * node_states[N_HIGH_MEMORY] contains nodes which > - * have normal memory or high memory. > - * Here we add the present_pages belonging to ZONE_HIGHMEM. > - * If the zone is within the range of [0..ZONE_HIGHMEM), and > - * we determine that the zones in that range become empty, > - * we need to clear the node for N_HIGH_MEMORY. > - */ > - present_pages +=3D pgdat->node_zones[ZONE_HIGHMEM].present_pages; > - if (zone_idx(zone) <=3D ZONE_HIGHMEM && nr_pages >=3D present_pages) > - arg->status_change_nid_high =3D zone_to_nid(zone); > -#endif > - > /* > - * We have accounted the pages from [0..ZONE_NORMAL), and > - * in case of CONFIG_HIGHMEM the pages from ZONE_HIGHMEM > - * as well. > + * We have accounted the pages from [0..ZONE_NORMAL); ZONE_HIGHMEM > + * does not apply as we don't support 32bit. > * Here we count the possible pages from ZONE_MOVABLE. > * If after having accounted all the pages, we see that the nr_pages > * to be offlined is over or equal to the accounted pages, > @@ -1851,9 +1822,6 @@ static void node_states_clear_node(int node, stru= ct memory_notify *arg) > if (arg->status_change_nid_normal >=3D 0) > node_clear_state(node, N_NORMAL_MEMORY); > =20 > - if (arg->status_change_nid_high >=3D 0) > - node_clear_state(node, N_HIGH_MEMORY); > - > if (arg->status_change_nid >=3D 0) > node_clear_state(node, N_MEMORY); > } > --=20 > 2.31.1 >=20 >=20 --=20 Oscar Salvador SUSE Labs