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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C4F2DC432C0 for ; Sat, 30 Nov 2019 23:43:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6DF702075C for ; Sat, 30 Nov 2019 23:43:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b7JD4xzY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DF702075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F0C506B0003; Sat, 30 Nov 2019 18:43:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EBCAA6B0005; Sat, 30 Nov 2019 18:43:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DAC736B0006; Sat, 30 Nov 2019 18:43:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id C7ED66B0003 for ; Sat, 30 Nov 2019 18:43:38 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 62C97824999B for ; Sat, 30 Nov 2019 23:43:38 +0000 (UTC) X-FDA: 76214573316.08.alarm59_3c99cb5efa55f X-HE-Tag: alarm59_3c99cb5efa55f X-Filterd-Recvd-Size: 7233 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Sat, 30 Nov 2019 23:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575157415; h=from:from:reply-to:subject:subject: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=Jkl7KGiguLG2F2BNGBb2tCWJx8nARmQpwG0BJG6w1/w=; b=b7JD4xzY/1F5lqNSCaX8MjI1tzOdiKpouz/aFyMRKcEpmzAXh9bBRcR7xTDUJ2vHoLruc2 Jdc4eW1KwBoGH/RfqIRXeJH9QgUeE54m0CB1M+D+HpeT5kmrFfK3JRicucoWIJ3cKfzgQJ js7ZKHK3NL7FDBPaXO86uV5+uRlq9Wo= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-osZx8ATdO5So1mYHQXrGMA-1; Sat, 30 Nov 2019 18:43:34 -0500 Received: by mail-wr1-f69.google.com with SMTP id i9so1522878wru.1 for ; Sat, 30 Nov 2019 15:43:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=GZtujzr0l0+mKSoRZKHKqRZOXhPQIgHRHg2+rgQiq6o=; b=L1BFbUYSAOuWGALSQ7NeJVRblgZGQK4ZSbh0emmyE2da0FDwQnumWVd+Ev8QfnZhDg 1iTY+3jA51s4JNo+CvTPoMJllk9HRSBCGedqIaizevRSa8MfJyFOFGt/978n2mdb53Sa Oidl27ifrzb5Hp5sWczkuZeUPQsqP+pywFdPq/Z5TRYN6dKtOdr3j5crf4jDaPhZ+oau xdDvGhL4k6UzYCkr3xQc6YARYf8FJ1zBlrzdptZn8Tw+F5kvhEnMhquTwv5hpFozi3a3 survwGg6PRrNn4+9JJ/B5gHMtfvfMTqeOETwycz9C/7dOypsRxcKgtMtgRUcHrSMGUND 28Fg== X-Gm-Message-State: APjAAAVs9yEzRs7+Lwh7Z3DAvejyWmEEw98ECiaQZ25l4tBp7hOVR+rH SAQ3iZk6p7jrzDYp4aXz1l1kB3mdUSMqOGgbAACj22/rN76kTIk3qedhpR5LSHPt6EYFW0d3YaE F+qo4Ri4nIYc= X-Received: by 2002:a5d:5273:: with SMTP id l19mr62419061wrc.175.1575157413060; Sat, 30 Nov 2019 15:43:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzSznnfN+3jmLsZgY+C1kSYwtDFwpK47WvO/djSbfp+Zc7QAq2qTE6nSthP6YL+9QmjpK9WrA== X-Received: by 2002:a5d:5273:: with SMTP id l19mr62419011wrc.175.1575157412819; Sat, 30 Nov 2019 15:43:32 -0800 (PST) Received: from ?IPv6:2a01:598:b90d:a4d5:5c22:7a2e:3224:745f? ([2a01:598:b90d:a4d5:5c22:7a2e:3224:745f]) by smtp.gmail.com with ESMTPSA id s65sm2523329wmf.48.2019.11.30.15.43.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Nov 2019 15:43:32 -0800 (PST) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v6 05/10] mm/memory_hotplug: Shrink zones when offlining memory Date: Sun, 1 Dec 2019 00:43:31 +0100 Message-Id: References: <20191130152159.258fa331542fc693e24723eb@linux-foundation.org> Cc: David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Yoshinori Sato , Rich Felker , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Mark Rutland , Steve Capper , Mike Rapoport , Anshuman Khandual , Yu Zhao , Jun Yao , Robin Murphy , Michal Hocko , Oscar Salvador , "Matthew Wilcox (Oracle)" , Christophe Leroy , "Aneesh Kumar K.V" , Pavel Tatashin , Gerald Schaefer , Halil Pasic , Tom Lendacky , Greg Kroah-Hartman , Masahiro Yamada , Dan Williams , Wei Yang , Qian Cai , Jason Gunthorpe , Logan Gunthorpe , Ira Weiny In-Reply-To: <20191130152159.258fa331542fc693e24723eb@linux-foundation.org> To: Andrew Morton X-Mailer: iPhone Mail (17A878) X-MC-Unique: osZx8ATdO5So1mYHQXrGMA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 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: > Am 01.12.2019 um 00:22 schrieb Andrew Morton : >=20 > =EF=BB=BFOn Sun, 27 Oct 2019 23:45:52 +0100 David Hildenbrand wrote: >=20 >> I think I just found an issue with try_offline_node().=20 >> try_offline_node() is pretty much broken already (touches garbage=20 >> memmaps and will not considers mixed NIDs within sections), however,=20 >> relies on the node span to look for memory sections to probe. So it=20 >> seems to rely on the nodes getting shrunk when removing memory, not when= =20 >> offlining. >>=20 >> As we shrink the node span when offlining now and not when removing,=20 >> this can go wrong once we offline the last memory block of the node and= =20 >> offline the last CPU. We could still have memory around that we could=20 >> re-online, however, the node would already be offline. Unlikely, but=20 >> possible. >>=20 >> Note that the same is also broken without this patch in case memory is= =20 >> never onlined. The "pfn_to_nid(pfn) !=3D nid" can easily succeed on the= =20 >> garbage memmap, resulting in no memory being detected as belonging to= =20 >> the node. Also, resize_pgdat_range() is called when onlining memory, not= =20 >> when adding it. :/ Oh this is so broken :) >>=20 >> The right fix is probably to walk over all memory blocks that could=20 >> exist and test if they belong to the nid (if offline, check the=20 >> block->nid, if online check all pageblocks). A fix we can then move in= =20 >> front of this patch. >>=20 >> Will look into this this week. >=20 > And this series shows almost no sign of having been reviewed. I'll hold > it over for 5.6. >=20 Makes sense, can=E2=80=98t do anything about it. Btw, this one is the last = stable patch to fix access of uninitialized memmaps that is not upstream ye= t... so it has to remain broken for some longer.