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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62F1DC433EF for ; Thu, 12 May 2022 07:28:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC4D56B0074; Thu, 12 May 2022 03:28:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C74056B0075; Thu, 12 May 2022 03:28:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEDA56B0078; Thu, 12 May 2022 03:28:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9CF896B0074 for ; Thu, 12 May 2022 03:28:45 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 63DFC3F9 for ; Thu, 12 May 2022 07:28:45 +0000 (UTC) X-FDA: 79456263810.17.05F573A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf26.hostedemail.com (Postfix) with ESMTP id 2B8B21400A6 for ; Thu, 12 May 2022 07:28:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652340524; 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=QfstWGJUBLYX/+vki/Cy7YQudH1HsO0LES4kozBG1lU=; b=F0VQSI0cyUE6Nufk4mVJzGJKvikmTO6uye+PjEV1YfCQ0X2bqbsvY/DqlnJvZ2LoeuSNZD CzaGqxzTGHFzUwheRIqYhyEsUJ/yc8VxF3pGvgiMy3G0Aku1ncnQRRib9OQR2pStlw2/t8 5EeQwZi7WdiEzG9vgDOkEg3urZjiLfo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-593-RSJruofTO6aY-ljLKYElvA-1; Thu, 12 May 2022 03:28:43 -0400 X-MC-Unique: RSJruofTO6aY-ljLKYElvA-1 Received: by mail-wr1-f72.google.com with SMTP id e4-20020a056000034400b0020cdf0dbf49so1453746wre.20 for ; Thu, 12 May 2022 00:28:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=QfstWGJUBLYX/+vki/Cy7YQudH1HsO0LES4kozBG1lU=; b=7JtItmpy27uxAmDu3RVOTze7Xsjo7kVIvnM/gmwxDTHKVxJVORLs0XptANe1YCjeGw 03x19relEv5p2PDXf3Wz83rRuvYV3XHPHrhkoVxq9PqKr37RoCAAyKgqR1rE+Jh806Fp uLVjSnkb28F5e5A8gmH9JOQJFVtC07FrNSrYVVT8vNiQgHpySEQ8RxbaT5HrY97GJ6cs A13iLLPDW+oSpxHo1lKRRHN9PljNba3epwzFXR1v8FNmr3UsjUlKhkmwupN3oRam0r5h RlY4Xf+7RHSD0Ye7vgViMyXWClt8PLIS3vMA9fW75NEd/6XZeC3w4dZgFdQJFZSITSWc TDQg== X-Gm-Message-State: AOAM530C8m0oOQwHuGxEumtpD/bWZvd2zKDG5Bmwtozbq/C4pCcUCABv nTrXaOME9amLVmI8FZq3RXQf00svky36WJPQFy03ZjAS4tMDVwG0ihwpUSmXQPeJxw7Rvx0tLHv TQ/8eLd/QRGg= X-Received: by 2002:a05:600c:3583:b0:394:804f:ecb2 with SMTP id p3-20020a05600c358300b00394804fecb2mr8858175wmq.10.1652340522085; Thu, 12 May 2022 00:28:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQpDPTggJKfya+MUlFlEpIuFmh0Zg+1wFOukWRLIMOVAz7TNkC4C6ofLd3Z14O0Stff2rccA== X-Received: by 2002:a05:600c:3583:b0:394:804f:ecb2 with SMTP id p3-20020a05600c358300b00394804fecb2mr8858161wmq.10.1652340521830; Thu, 12 May 2022 00:28:41 -0700 (PDT) Received: from ?IPV6:2003:cb:c701:d200:ee5d:1275:f171:136d? (p200300cbc701d200ee5d1275f171136d.dip0.t-ipconnect.de. [2003:cb:c701:d200:ee5d:1275:f171:136d]) by smtp.gmail.com with ESMTPSA id j12-20020a5d618c000000b0020c5253d8f2sm3383048wru.62.2022.05.12.00.28.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 May 2022 00:28:41 -0700 (PDT) Message-ID: Date: Thu, 12 May 2022 09:28:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [RFC PATCH v1 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug To: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= Cc: Miaohe Lin , Oscar Salvador , Naoya Horiguchi , "linux-mm@kvack.org" , Andrew Morton , Mike Kravetz , Yang Shi , Muchun Song , "linux-kernel@vger.kernel.org" References: <54399815-10fe-9d43-7ada-7ddb55e798cb@redhat.com> <20220427122049.GA3918978@hori.linux.bs1.fc.nec.co.jp> <20220509072902.GB123646@hori.linux.bs1.fc.nec.co.jp> <6a5d31a3-c27f-f6d9-78bb-d6bf69547887@huawei.com> <465902dc-d3bf-7a93-da04-839faddcd699@huawei.com> <0389eac1-af68-56b5-696d-581bb56878b9@redhat.com> <20220511161052.GA224675@hori.linux.bs1.fc.nec.co.jp> <6986a8dd-7211-fb4d-1d66-5b203cad1aab@redhat.com> <20220512063558.GA249122@hori.linux.bs1.fc.nec.co.jp> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220512063558.GA249122@hori.linux.bs1.fc.nec.co.jp> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: oc59ouidkdmtahehjsj3pjiwj1a51k4e Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=F0VQSI0c; spf=none (imf26.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2B8B21400A6 X-HE-Tag: 1652340522-366598 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: >>>> >>>> Once the problematic DIMM would actually get unplugged, the memory block devices >>>> would get removed as well. So when hotplugging a new DIMM in the same >>>> location, we could online that memory again. >>> >>> What about PG_hwpoison flags? struct pages are also freed and reallocated >>> in the actual DIMM replacement? >> >> Once memory is offline, the memmap is stale and is no longer >> trustworthy. It gets reinitialize during memory onlining -- so any >> previous PG_hwpoison is overridden at least there. In some setups, we >> even poison the whole memmap via page_init_poison() during memory offlining. >> >> Apart from that, we should be freeing the memmap in all relevant cases >> when removing memory. I remember there are a couple of corner cases, but >> we don't really have to care about that. > > OK, so there seems no need to manipulate struct pages for hwpoison in > all relevant cases. Right. When offlining a memory block, all we have to do is remember if we stumbled over a hwpoisoned page and rememebr that inside the memory block. Rejecting to online is then easy. -- Thanks, David / dhildenb