Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4522444ioa; Wed, 27 Apr 2022 05:46:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfdKnNS94anCwCk3A6DvXbyHCmgMlUtKFNGTHTwkTm3tkGqcjd+jgIumG5Jh9xl6UGjIU3 X-Received: by 2002:a17:903:2406:b0:158:f6f0:6c44 with SMTP id e6-20020a170903240600b00158f6f06c44mr28108870plo.88.1651063606696; Wed, 27 Apr 2022 05:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651063606; cv=none; d=google.com; s=arc-20160816; b=johwoS//gqBykaBThKYw/UtKBMGXSMQZdyxuSDuNvQiCCWzrSW2090/WT+8KQIjkwY Bj+wucBxWJX6P3IB3IbpG62obNzi1cttKBNRZW+c2M2vSzMZdvSlFY4XLbxhh5oWCjfA +Hc+6WDHrML51oQALuVdPLY2jv3MXrJLMtrikqfqsCY/oAPeAunHvKSgwUgv9Tj2Nbbo RbYMXnSoV50xI5qGHEWFWpgC+VBrMxGq/47QnFSZqXXhgV3cCQUvtjhS1nZ6MdzYCipq 1SXY05q1sRNWJU2hY//Ke8haOIjZSL0ohDKrGuWfHE9bQTz+f+RL6g5HvGUWQu3fMgMp KpfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=mZnZ1I8k+ftCApGqx0VMrkh9aJHI/MK3Cg/5kMjpBYg=; b=W0fbE13ANG6hguca+scoIlzyYFDveW+gMnbmYRgA/gMwFliMVnBuwQoSg6fKyQCpxm 6s7KfUAVt3lwYID1ohDlX9JjXNDlqnacUHHaKRXmtCf7ki+ceDM/kp81pXtZsK2tDfaZ f+jmfkB12rA8h7CMrVehvuPfGDQ8fYXQvR62bDKK2MVgXodkKp+OUEj/PgGwWsdQ87WM J6BM1l7E9DMlTD1GfAkAlILrHaIkNLUcT5TT6AKvUsPvf7kXnpNWgVvZ99eIr3hqob6g /fzHXIRlLgScme8nsCCXIkg+Tg5Wp6VUJvV/Q/KD2SLtV1T+fcUVPT/7GpzDtP4mEmhh UMLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rUoTgBFB; dkim=neutral (no key) header.i=@suse.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ng7-20020a17090b1a8700b001d973c6d990si5598903pjb.169.2022.04.27.05.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 05:46:46 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rUoTgBFB; dkim=neutral (no key) header.i=@suse.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EF3AC48E7D; Wed, 27 Apr 2022 05:20:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234034AbiD0MX5 (ORCPT + 99 others); Wed, 27 Apr 2022 08:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233884AbiD0MXj (ORCPT ); Wed, 27 Apr 2022 08:23:39 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6C8A3A199 for ; Wed, 27 Apr 2022 05:20:28 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5B29B210E3; Wed, 27 Apr 2022 12:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1651062027; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mZnZ1I8k+ftCApGqx0VMrkh9aJHI/MK3Cg/5kMjpBYg=; b=rUoTgBFB55yqwDfI1zBrwZae4p1SVlnDeLtfzrXlgrEkuYxhTuCGakMejE4G2herRvyvGA yIpBdMFptRNJH8YLv3JaqWZyhJKS+ndTxlHkfSYD5C5ILX7LYHLTehJbTLJNkVRw1rj6uZ hScYwAQbRXnbTNlwWLJIr9Fzqq8NGqM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1651062027; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mZnZ1I8k+ftCApGqx0VMrkh9aJHI/MK3Cg/5kMjpBYg=; b=QOhOFA2i8zVbsB8S1KdpFOlz2g88qj17xpn8NYoEpCQaHJco9Yz0T8RngKwIN+Uu3vdrsN RAM7A1+jHY6bpvDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2F4FF13A39; Wed, 27 Apr 2022 12:20:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id DPsRCAk1aWLFNwAAMHmgww (envelope-from ); Wed, 27 Apr 2022 12:20:25 +0000 Date: Wed, 27 Apr 2022 14:20:22 +0200 From: Oscar Salvador To: David Hildenbrand Cc: Naoya Horiguchi , linux-mm@kvack.org, Andrew Morton , Miaohe Lin , Mike Kravetz , Yang Shi , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Message-ID: References: <20220427042841.678351-1-naoya.horiguchi@linux.dev> <54399815-10fe-9d43-7ada-7ddb55e798cb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54399815-10fe-9d43-7ada-7ddb55e798cb@redhat.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 On Wed, Apr 27, 2022 at 12:48:16PM +0200, David Hildenbrand wrote: > I raised some time ago already that I don't quite see the value of > allowing memory offlining with poisened pages. > > 1) It overcomplicates the offlining code and seems to be partially > broken > 2) It happens rarely (ever?), so do we even care? > 3) Once the memory is offline, we can re-online it and lost HWPoison. > The memory can be happily used. > > 3) can happen easily if our DIMM consists of multiple memory blocks and > offlining of some memory block fails -> we'll re-online all already > offlined ones. We'll happily reuse previously HWPoisoned pages, which > feels more dangerous to me then just leaving the DIMM around (and > eventually hwpoisoning all pages on it such that it won't get used > anymore?). > > So maybe we should just fail offlining once we stumble over a hwpoisoned > page? > > Yes, we would disallow removing a semi-broken DIMM from the system that > was onlined MOVABLE. I wonder if we really need that and how often it > happens in real life. Most systems I am aware of don't allow for > replacing individual DIMMs, but only complete NUMA nodes. Hm. I teend to agree with all you said. And to be honest, the mechanism of making a semi-broken DIMM healthy again has always been a mistery to me. One would think that: 1- you hot-remove the memory 2- you fix/remove it 3- you hotplug memory again but I am not sure how many times this came to be. And there is also the thing about losing the hwpoison information between offline<->online transitions, so, the thing is unreliable. And for that to work, we would have to add a bunch of code to keep track of "offlined" pages that are hwpoisoned, so we flag them again once they get onlined, and that means more room for errors. So, I would lean towards the fact of not allowing to offline memory that contain such pages in the first place, unless that proves to be a no-go. -- Oscar Salvador SUSE Labs