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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DC2BC636C8 for ; Thu, 15 Jul 2021 18:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3304C613C9 for ; Thu, 15 Jul 2021 18:12:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237713AbhGOSPg (ORCPT ); Thu, 15 Jul 2021 14:15:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:38376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237690AbhGOSPe (ORCPT ); Thu, 15 Jul 2021 14:15:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1AF761289; Thu, 15 Jul 2021 18:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1626372760; bh=563x5jc9W0wYdsYhRrwdZ2cKbN/d2MVtmAqW50LZyZ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FsZnz9nP1bhbXjnQ1v7vfL8Px6/NRc9/Tw/5rjvcQ0W74+LUQmJOvDrhD7sN0bzCQ A/377ILCL8HxH19Q2Bq7wRbdh8O+CrDgK5A9RTOxBhwtSw48htNA/wZQtNIKA/f8jC 7An5l1t6/H9nn+OV8w1rtEldUw2KaUAy48s9tI5o= Date: Thu, 15 Jul 2021 11:12:38 -0700 From: Andrew Morton To: David Hildenbrand Cc: Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , Michael Ellerman , Catalin Marinas , virtualization@lists.linux-foundation.org, linux-acpi@vger.kernel.org, Andy Lutomirski , "Aneesh Kumar K.V" , Anton Blanchard , Ard Biesheuvel , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Christian Borntraeger , Christophe Leroy , Dave Jiang , "H. Peter Anvin" , Ingo Molnar , Jia He , Joe Perches , Kefeng Wang , Laurent Dufour , Michel Lespinasse , Nathan Lynch , Nicholas Piggin , Paul Mackerras , Peter Zijlstra , Pierre Morel , "Rafael J. Wysocki" , Rich Felker , Scott Cheloha , Sergei Trofimovich , Thiago Jung Bauermann , Thomas Gleixner , Vasily Gorbik , Vishal Verma , Will Deacon , Yoshinori Sato Subject: Re: [PATCH v1 1/4] mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range() Message-Id: <20210715111238.a557aec31381646d5cd71ef2@linux-foundation.org> In-Reply-To: <99c59db8-4c3d-6bee-9acc-41a8f76899ef@redhat.com> References: <20210712124052.26491-1-david@redhat.com> <20210712124052.26491-2-david@redhat.com> <99c59db8-4c3d-6bee-9acc-41a8f76899ef@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Jul 2021 11:42:21 +0200 David Hildenbrand wrote: > > I'd propose to add Cc: since I actually had > > the fun to try to debug something like this a couple of years ago: > > 6cdb18ad98a4 ("mm/vmstat: fix overflow in mod_zone_page_state()") > > > > Good point, and thinking again what can go wrong, I tend to agree. We > are trying to keep zones contiguous and it could happen that we end up > with something like ZONE_DMA here (via default_kernel_zone_for_pfn()) > and would consequently online something to ZONE_DMA that doesn't belong > there, resulting in crashes. > > @Andrew can you add Cc: and > > "As we will search for a fitting zone using the wrong pfn, we might end > up onlining memory to one of the special kernel zones, such as ZONE_DMA, > which can end badly as the onlined memory does not satisfy properties of > these zones." Yep, all done.