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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 6B94CC433ED for ; Fri, 16 Apr 2021 10:38:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D4E8611AB for ; Fri, 16 Apr 2021 10:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240677AbhDPKi0 (ORCPT ); Fri, 16 Apr 2021 06:38:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:36192 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233979AbhDPKiZ (ORCPT ); Fri, 16 Apr 2021 06:38:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E10B3B000; Fri, 16 Apr 2021 10:37:59 +0000 (UTC) Date: Fri, 16 Apr 2021 12:37:54 +0200 From: Oscar Salvador To: David Hildenbrand Cc: Andrew Morton , Michal Hocko , Anshuman Khandual , Pavel Tatashin , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 4/8] mm,memory_hotplug: Allocate memmap from the added memory range Message-ID: References: <20210416102153.8794-1-osalvador@suse.de> <20210416102153.8794-5-osalvador@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 16, 2021 at 12:33:34PM +0200, David Hildenbrand wrote: > IIRC, we have to add the zero shadow first, before touching the memory. This > is also what mm/memremap.c does. > > In mhp_deinit_memmap_on_memory(), you already remove in the proper > (reversed) order :) But looking at online_pages(), we do it after the move_pfn_range_to_zone(), right? AFAIK (I might be well wrong here), memory_notify() will eventually call kasan_add_zero_shadow? So that comes after the move_pfn_range_to_zone? Or is my understanding incorrect? -- Oscar Salvador SUSE L3