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 28121C25B74 for ; Mon, 3 Jun 2024 02:19:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C32B6B0093; Sun, 2 Jun 2024 22:19:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 474BB6B0095; Sun, 2 Jun 2024 22:19:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3628F6B0098; Sun, 2 Jun 2024 22:19:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1829B6B0093 for ; Sun, 2 Jun 2024 22:19:46 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 91FD9C05A3 for ; Mon, 3 Jun 2024 02:19:45 +0000 (UTC) X-FDA: 82187971530.21.BA18672 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf26.hostedemail.com (Postfix) with ESMTP id 60589140015 for ; Mon, 3 Jun 2024 02:19:41 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.190 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717381183; h=from:from:sender: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=tJBVthBMWab47hiNGwDP5lygOEtA9y1Va4QHEWijwOc=; b=K5Zs72bbu+ALzo1oIXKHD7t1FeVNHhoEnBhdwIijE3vM4aBLqNlyQlDPE1kUyJi2x/gD9H VEG2Q8HDziTWV0HxY9V8PWGGGxYxRhphu6X12JuH3BIXcqvMvXGY8JQIiqb6tmGhQ9VHUi 6c84xste8lseuwbs90JhPXDHcS+yiFs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717381183; a=rsa-sha256; cv=none; b=P45k1oa/plDzdnc/fwnnnAy4Sm20H0Z7mxyEBuzx47481c0VBGB9pxE1DP9zTxH5RNN36Q FXjWScUD6XmJfFboNuApj5JVNuah+09PGthcyb7Eviv6UVUmnL+gyMvnWGwQI6/KgOvvL0 skahLDNMu8gkps620SdFJehQw0CA8lQ= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.190 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Vsy5L06dTz1ysjG; Mon, 3 Jun 2024 10:16:22 +0800 (CST) Received: from canpemm500002.china.huawei.com (unknown [7.192.104.244]) by mail.maildlp.com (Postfix) with ESMTPS id 6A6591400D5; Mon, 3 Jun 2024 10:19:36 +0800 (CST) Received: from [10.173.135.154] (10.173.135.154) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 3 Jun 2024 10:19:36 +0800 Subject: Re: [PATCH] mm/memory-failure: Stop setting the folio error flag To: "Matthew Wilcox (Oracle)" CC: , Andrew Morton References: <20240531032938.2712870-1-willy@infradead.org> From: Miaohe Lin Message-ID: Date: Mon, 3 Jun 2024 10:19:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20240531032938.2712870-1-willy@infradead.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.135.154] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-Stat-Signature: ns1efwe6cfxcn3wohjqqyddc3ktfzngh X-Rspamd-Queue-Id: 60589140015 X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1717381181-664737 X-HE-Meta: U2FsdGVkX1/NpJXhumHjNr8YmqX8EaeEbsd05wRMWzbHVPgfqASFhtz3H9/q4CQbtmkOMmn2j9PUdh2YvkFMlLygW9ma/Fa440lwOp8ikPKWD3JBFAppwo7lCqS+sBXeVFJ3u3xhA2000qnMpjZ2OnngW7l84d2cEM5ISKUh1OkXMW4glL9gM/FDTx0KmsBcJ+xAd0DJ+WfAfnxHAzI+xqE9a9MDyN1TL3tsA9/ZDVcs/4HrrwRMqKabUU4M6TIKr0Fwyz88X70f+iZsE3w4l/d/a1UjFageF09JOnE8uzcgKT97hZvyKRjvWZPQ+LOrxk3o19oyA6DB5DrT2UInqON4SM9PdrL1g82MQcAKH0lRxLquF4VCtM4ag42RKPtw8VpyoSUAaDSSxS9zotjHVLzD2dVDQ9XcuaLD9ar6QUS4T3mXXPu7Pi17rTQzb+ceYuQn6mslMhOjTzzMFJ7sFyg37l3v0Fu5FFwwKVAk6U0AbA32J/xc5CPijNUbjC5tNPRIZwOwXNM0lL/xbWK7Cg3C1UocUnk7Y0U12BDbs3w5gb7fOCnMa/8WBIg00i+FE9FfzEiAEItB+Kgil/+r9SwXP0G20Pmmgi3TM8ustEKPsNPZuZzKyw5T8TRRhZH6HZewahahtKraKp5TvISKJKprjqzeqzvJv6WNE569RtBfJiegPGJOm5geEdI0OssxjhPrcS2Nkjcx9UwEwSBjvqYu8WcgTd7G6faijL7j+fkKLjqXwhDszuZHyaONPQ4HyqpSctNfGM4ezDbxMh/pvDDsvYcVul1hqdtOF4Ttnnzu/JQzGEQpyKJ7QLWUorS96UDy/nWRIDz1VS7/hflD+iNcZ/OLvw53qJc1SXb6sED1fGaglmGFs/0wmQNGkopYCVz0zgmgVM73UXyHsaGDz7hzxO4RmxiNcupNEaEqknLD7/UEHdbNfxQZfdRluU09BeV+EYoNlGC5E5lkzSW GKzahUEu brSR86ZmzZhI9I+HRS5QB/mLUpMPdvXKPiLUlT8sTMveDi8J+qNwc83cG02SBRl19G1S2JfGEmzlG+cOTyBQd1UTkfrOu7B/CbEW37yTEnV8hci39Tdgjv56on2ag+m0YgVVB3PhPXQZoZYGv9CxLkB+2O4Iq/QD/YfWHQhqPetESOXwlelohJD7t/dT7p6RMWnwh7K4Zle7TtX0aAhxY4F6modh7ZQ5flgx7rxdesEMleZ+/clVL0KDNDZI2/erpGm9qyLmUS/IM2zIK/J+BOHzBOO6fG6iqwx1NNrhjYaDjfWU= 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: List-Subscribe: List-Unsubscribe: On 2024/5/31 11:29, Matthew Wilcox (Oracle) wrote: > Nobody checks the error flag any more, so setting it accomplishes > nothing. Remove the obsolete parts of this comment; it hasn't > been true since errseq_t was used to track writeback errors in 2017. > > Cc: Miaohe Lin > Cc: linux-mm@kvack.org > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Miaohe Lin Thanks. . > --- > mm/memory-failure.c | 29 ----------------------------- > 1 file changed, 29 deletions(-) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index ac030061eda0..78fdf5ee8421 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -1112,7 +1112,6 @@ static int me_pagecache_dirty(struct page_state *ps, struct page *p) > struct folio *folio = page_folio(p); > struct address_space *mapping = folio_mapping(folio); > > - SetPageError(p); > /* TBD: print more information about the file. */ > if (mapping) { > /* > @@ -1120,34 +1119,6 @@ static int me_pagecache_dirty(struct page_state *ps, struct page *p) > * who check the mapping. > * This way the application knows that something went > * wrong with its dirty file data. > - * > - * There's one open issue: > - * > - * The EIO will be only reported on the next IO > - * operation and then cleared through the IO map. > - * Normally Linux has two mechanisms to pass IO error > - * first through the AS_EIO flag in the address space > - * and then through the PageError flag in the page. > - * Since we drop pages on memory failure handling the > - * only mechanism open to use is through AS_AIO. > - * > - * This has the disadvantage that it gets cleared on > - * the first operation that returns an error, while > - * the PageError bit is more sticky and only cleared > - * when the page is reread or dropped. If an > - * application assumes it will always get error on > - * fsync, but does other operations on the fd before > - * and the page is dropped between then the error > - * will not be properly reported. > - * > - * This can already happen even without hwpoisoned > - * pages: first on metadata IO errors (which only > - * report through AS_EIO) or when the page is dropped > - * at the wrong time. > - * > - * So right now we assume that the application DTRT on > - * the first EIO, but we're not worse than other parts > - * of the kernel. > */ > mapping_set_error(mapping, -EIO); > } >