Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp925996iob; Thu, 12 May 2022 07:33:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXLy37/Gk4BbqrSuvlklUxLmYkgkJPWxFodR0DxEdEVndNb37pWEApJzRe28EOeFTL8Idy X-Received: by 2002:a17:90a:7e94:b0:1da:3b47:b00e with SMTP id j20-20020a17090a7e9400b001da3b47b00emr11487627pjl.222.1652366032718; Thu, 12 May 2022 07:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652366032; cv=none; d=google.com; s=arc-20160816; b=OaHThsOP89yVWjsgNk04ErQlp/1ugTiHt+cwQJ1zN1YmL+k79L3W4y8bkVponyWoCV juyZ3SM1NUFtYfgSYb/k+45M3t+r+h5h6BGmBUbIiCehAu5js8GQr4kWgF6f4p9h6OIv f5iGC5pYuSAHLz/DlcX9hv8ZPUS1lYnixExtiGKfsZSqgzbrBGlJ97rQ5DrF5zi5ohwB OV7sqHNu4tnxoBhTpJGleOye/k7VPwpLQgBKKxGVXIWpjZxd+ect35IcwzyFpEOwv+Kh GjipaX/pxRLP2c/OWVBDWKXlPbux42ZtxhdJDKNSjJj86kqmEopsiXXnIH5nW1WqnLAo f9Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=QfstWGJUBLYX/+vki/Cy7YQudH1HsO0LES4kozBG1lU=; b=hTphkR8faNgVX9B5/62d/TJRKEKhmuyeBxv4U4MYSH/p8ciXnuIPAn8eAgN70CUuZb XE3DCriZZbsjBF3d/bbk7AsLZB3nLekEzAHq4V9vn/bgV65wDAkUau66qoiqztab9Yze wiI0qU6H20duV4IdQKEJUgccgm77PtMc6n3AKWF7agTZuLzhBcbiRIKhgdC9CYQWESOO Bn0ObbMtt5NqI8nisMgWL4WHKP54PB/RjGVfKasIbzt8eLT30aTy39MTESSmHM/ukw0p XXYmgvJsy92aenwwkGA5PEIIbJd/jy6ov7nW24ymvZPjSjdPHkCKfW/QOEmWuMJWydWy o9RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F0VQSI0c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gw19-20020a17090b0a5300b001d653c53a03si4008390pjb.11.2022.05.12.07.33.37; Thu, 12 May 2022 07:33:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F0VQSI0c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346754AbiELH24 (ORCPT + 99 others); Thu, 12 May 2022 03:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239776AbiELH2q (ORCPT ); Thu, 12 May 2022 03:28:46 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD42B13B8C6 for ; Thu, 12 May 2022 00:28:45 -0700 (PDT) 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-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-93-LT9iwnfFPDGgzSk8MxuNcg-1; Thu, 12 May 2022 03:28:43 -0400 X-MC-Unique: LT9iwnfFPDGgzSk8MxuNcg-1 Received: by mail-wr1-f71.google.com with SMTP id s16-20020adfeb10000000b0020cc4e5e683so1724996wrn.6 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=E7Zx19z0ZHT/C5nW29KNhhKcBriII91ImJfZ7g7noeI/+gnAKDntB9hInOspK+Q64p VAnKSLOc2hBgH6Mh0h017OKsG0hoolBUsTqSJcmmT75Eltk7zTdP9uAVQUKY1p/c1+/8 WYWnU9XtfJu9Uam6XGxX906XdKnkCrgrWKqrV+33fAUV0ucAvQNzANO6GbjNJ2e/7sQi 363wzIsegiYIEnff94f3BucJRgkQCTG30jCf7kgc1xnxb3kfOPXq6bULHmg88PcA0qVY WXXqn+kP0sww5NYL1AE8ahc+hHGIZzwqA22lYZYmb0RWF3uNMVC95Bdtjk7tDPDl16n8 B54g== X-Gm-Message-State: AOAM530Bmks61pDDX3dLJ+xZe+HBcq33tJmhBEvKS5iS/u7awUL0wASS uLAqm+47quPj/HX8yUT/tJlP/3Nq8V+/dy/LylvIDRB8XF6OkEPfqgfYZpzx5oyLZlXZ5LMHB2V QDtJU33qWZ1B0cBmkfd5AyEyy X-Received: by 2002:a05:600c:3583:b0:394:804f:ecb2 with SMTP id p3-20020a05600c358300b00394804fecb2mr8858177wmq.10.1652340522087; Thu, 12 May 2022 00:28:42 -0700 (PDT) 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 Content-Language: en-US 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>> >>>> 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