From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout06.his.huawei.com (canpmsgout06.his.huawei.com [113.46.200.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81E01369990; Tue, 9 Jun 2026 07:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.221 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780991520; cv=none; b=rOpoVgNTWUYhxTKEp+6UkHm6few0Mu7eyMwq+LZSFr7jHZ/9j6qtvurd6E+3q7OE7jzIez9wKW7dcSFEnUDs4KDwqTLp88xCkXWXVqRre4+/3T/3ukRkoD8jJg+kXuS+gA4Dq/FmFqzT040vhbeHMT7yY8CteJi1jH8FZIH2n7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780991520; c=relaxed/simple; bh=DgpCBuylZz3lMAzLfOHE16OZ72InBRt2krZnuWafBns=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=I3Km0s8E32l0J7BiEnSTooX8FbbnWGlJr+OTJ0LSKb72K3x//FvMcVexnae+eURkUwf4LZ0i8BRFWyYqSeIyjjujsmZgxJB9SUgWVROOr9pMl94jRwFmO0GM1U/3MECnogfZK4AtAeYyPUZFyw36Acdvgq7vHlN7c6YV3OKd+x4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=Un4O6Gug; arc=none smtp.client-ip=113.46.200.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="Un4O6Gug" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=2FM4sS/C5uG7Pi6GSiyi+YB4VWpWxENKePM4logKFk8=; b=Un4O6GugkBeaXI2tHa2pBYDiDsQNOT3aw8431Ml92QSBu5/2j/xqtEeqpALgdvA7z46KaugH2 1DZmGtnDu8tDUmW2iNV15nVdEeHyJ1KXdK+HCzE1oRxGwRVFGxLlF4K1jw88UF3b/Pw//53l6+X GOLUWCp1IxoyE73b5Suc1Fc= Received: from mail.maildlp.com (unknown [172.19.163.104]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4gZLWb4131zRhWL; Tue, 9 Jun 2026 15:43:55 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id C8ECD4056A; Tue, 9 Jun 2026 15:51:48 +0800 (CST) Received: from kwepemq500010.china.huawei.com (7.202.194.235) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 9 Jun 2026 15:51:48 +0800 Received: from [10.173.124.160] (10.173.124.160) by kwepemq500010.china.huawei.com (7.202.194.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 9 Jun 2026 15:51:47 +0800 Subject: Re: [PATCH v4 2/7] mm: memory_failure: Allow truncate_error_folio to return MF_DELAYED To: Lisa Wang CC: , , , , , , , , Naoya Horiguchi , Andrew Morton , "Paolo Bonzini" , Shuah Khan , Hugh Dickins , Baolin Wang , "David Hildenbrand" , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , , , , References: <20260602-memory-failure-mf-delayed-fix-v4-0-a5bc7db5a9b2@google.com> <20260602-memory-failure-mf-delayed-fix-v4-2-a5bc7db5a9b2@google.com> From: Miaohe Lin Message-ID: <76848661-d3cb-03d5-f351-4ffdf889a09e@huawei.com> Date: Tue, 9 Jun 2026 15:51:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20260602-memory-failure-mf-delayed-fix-v4-2-a5bc7db5a9b2@google.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To kwepemq500010.china.huawei.com (7.202.194.235) On 2026/6/3 5:55, Lisa Wang wrote: > The .error_remove_folio a_ops is used by different filesystems to handle > folio truncation upon discovery of a memory failure in the memory > associated with the given folio. > > Currently, MF_DELAYED is treated as an error, causing "Failed to punch > page" to be written to the console. MF_DELAYED is then relayed to the > caller of truncate_error_folio() as MF_FAILED. This further causes > memory_failure() to return -EBUSY, which then always causes a SIGBUS. > > This is also implies that regardless of whether the thread's memory > corruption kill policy is PR_MCE_KILL_EARLY or PR_MCE_KILL_LATE, a > memory failure with MF_DELAYED will always cause a SIGBUS. > > Update truncate_error_folio() to return MF_DELAYED to the caller if the > .error_remove_folio() callback reports MF_DELAYED. > > Signed-off-by: Lisa Wang Should we add a Fixes tag here? Acked-by: Miaohe Lin Thanks. .