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 DD568CCA482 for ; Wed, 8 Jun 2022 09:19:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 05CD26B009B; Wed, 8 Jun 2022 05:19:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 00C456B009C; Wed, 8 Jun 2022 05:19:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E16C08D001E; Wed, 8 Jun 2022 05:19:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D282E6B009B for ; Wed, 8 Jun 2022 05:19:40 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id A331780C84 for ; Wed, 8 Jun 2022 09:19:40 +0000 (UTC) X-FDA: 79554520920.27.2FA2211 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 34F0940051 for ; Wed, 8 Jun 2022 09:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654679979; 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=13NAg8Y7+eREL6LPlJWQbbTH4LT7eT0fI4DvffznR04=; b=W0qr5jKys4ej/dK4hGYClpef1hVq7SvqdXlBRV5RmkGzYVQAzo3KlZq0McQfDxavyLwK4b jWc9XwDhyt55yOGAYD5FUY1dW4+T5fqmRcUVEmnAzj+IWijOsBiHY6rRv4fr5AZy72LCbv g5rYp8rmFyFa3b+S1z0AdOKDk+ixxa0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-208-YAJPrk1NO2qS4JqjZW7vSw-1; Wed, 08 Jun 2022 05:19:38 -0400 X-MC-Unique: YAJPrk1NO2qS4JqjZW7vSw-1 Received: by mail-wm1-f70.google.com with SMTP id u12-20020a05600c19cc00b0038ec265155fso14144529wmq.6 for ; Wed, 08 Jun 2022 02:19:38 -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=13NAg8Y7+eREL6LPlJWQbbTH4LT7eT0fI4DvffznR04=; b=OQrq5efum3tqX4dWkaX/bCWmm+N1YISyAZNc6K07YlPVTGfLR24l8csJ8ljHPzEHkc Pz/B6h/h7AP9J4nP3B8P83KHMFImVOktVar2m6KTjFVEm2pNsCdPmAA3Wjvl6TjLr0jY dslVMY9kMDsJ1JSa20bDfu/a04U+PmkHm116JGcjUcjGG2EXFG1L7E/QMUWSquLfiGbI 8eIXLaDK4C0a0mLbauID+0sx/d5/+2NLirBfFWcnNEpR4rhm5A5n6U35qtviRBodDlvZ UJaqWaQcQdYkj05i8ZfGA382V2aSZKr5LymS8Qt9ksT4FWxvjnFqnqYp0/bFyG18Jnfk KD9A== X-Gm-Message-State: AOAM531+IZQVi4mbREGZp/cFQBx8qWyhk23nuEwt8SYiiU4j/RBPbHqx wy5sVpUK774bkCBzmpAFXuOc8v2QYpgz38/TT0UsoQnKeaAqunCRJnxMNaS1LfPQJEKypAXTT7e r4qSMx/UnIms= X-Received: by 2002:a5d:6201:0:b0:214:624f:3b with SMTP id y1-20020a5d6201000000b00214624f003bmr26536248wru.34.1654679976983; Wed, 08 Jun 2022 02:19:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmoHFG+ZHWvDCZ+ku1HYxYNMBOth7o3mggV/oOgCUiNBVb3tPsXzcn47+zI3XgF1qZBQqc4w== X-Received: by 2002:a5d:6201:0:b0:214:624f:3b with SMTP id y1-20020a5d6201000000b00214624f003bmr26536226wru.34.1654679976713; Wed, 08 Jun 2022 02:19:36 -0700 (PDT) Received: from ?IPV6:2003:cb:c705:ad00:db2:4c6:8f3a:2ec4? (p200300cbc705ad000db204c68f3a2ec4.dip0.t-ipconnect.de. [2003:cb:c705:ad00:db2:4c6:8f3a:2ec4]) by smtp.gmail.com with ESMTPSA id n8-20020a05600c4f8800b0039c325eaff2sm20090977wmq.26.2022.06.08.02.19.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 02:19:33 -0700 (PDT) Message-ID: Date: Wed, 8 Jun 2022 11:19:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v1 1/5] mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page To: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= Cc: Naoya Horiguchi , "linux-mm@kvack.org" , Andrew Morton , Mike Kravetz , Miaohe Lin , Liu Shixin , Yang Shi , Oscar Salvador , Muchun Song , "linux-kernel@vger.kernel.org" References: <20220602050631.771414-1-naoya.horiguchi@linux.dev> <20220602050631.771414-2-naoya.horiguchi@linux.dev> <20220608013125.GA1404644@hori.linux.bs1.fc.nec.co.jp> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220608013125.GA1404644@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: 8bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 34F0940051 X-Stat-Signature: o4qdoundd5razbn3cts65oi8z3cxztct X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=W0qr5jKy; spf=none (imf04.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1654679980-681562 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: On 08.06.22 03:31, HORIGUCHI NAOYA(堀口 直也) wrote: > On Tue, Jun 07, 2022 at 03:04:15PM +0200, David Hildenbrand wrote: >> On 02.06.22 07:06, Naoya Horiguchi wrote: >>> From: Naoya Horiguchi >>> >>> When handling memory error on a hugetlb page, the error handler tries to >>> dissolve and turn it into 4kB pages. If it's successfully dissolved, >>> PageHWPoison flag is moved to the raw error page, so that's all right. >>> However, dissolve sometimes fails, then the error page is left as >>> hwpoisoned hugepage. It's useful if we can retry to dissolve it to save >>> healthy pages, but that's not possible now because the information about >>> where the raw error page is lost. >>> >>> Use the private field of a tail page to keep that information. The code >>> path of shrinking hugepage pool used this info to try delayed dissolve. >>> This only keeps one hwpoison page for now, which might be OK because it's >>> simple and multiple hwpoison pages in a hugepage can be rare. But it can >>> be extended in the future. >>> >>> >> >> But what would happen now if you have multiple successive MCE events on >> such a page now? > > The 2nd and later events are ignored due to "already hwpoisoned hugepage", > this might not be good when the hwpoisoned hugepage is freed/dissolved later. > So a temporal workaround is to remember "hugepage has multiple hwpoison pages" > and disable free/dissolve for such hugepages. Right. We might want to indicate exactly one vs. multiple, and then in __update_and_free_page(), move the hwpoison flag to one subpage, eventually exposing other corrupted subpages to the system. -- Thanks, David / dhildenb