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 68217C4345F for ; Fri, 12 Apr 2024 22:10:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8C10C6B0082; Fri, 12 Apr 2024 18:10:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 870106B0083; Fri, 12 Apr 2024 18:10:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 711AF6B0087; Fri, 12 Apr 2024 18:10:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 53BD36B0082 for ; Fri, 12 Apr 2024 18:10:06 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D2D5580EF9 for ; Fri, 12 Apr 2024 22:10:05 +0000 (UTC) X-FDA: 82002273570.24.857CD9D Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf17.hostedemail.com (Postfix) with ESMTP id 87B6D40017 for ; Fri, 12 Apr 2024 22:10:03 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UwIvzHSy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="tb/VBRwi"; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UwIvzHSy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="tb/VBRwi"; spf=pass (imf17.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712959804; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WBHJZW5qfzOJEsB66VilWK9Gm3cfveDWqnlEOgZ9QAU=; b=75Mx8A0zDD8syJu9o7vPjxYyA2+R9+b1iuDDC7iMbND6V4hKroBC74Lg+/daKVWF5NoFwA Y8Jy5k7ljAhD8/xSk1ecylSDR9j0OZiWhxqrPCAQbEQp8aKA5tGEYZq8obxivZ9+YvzINw /QKbQZKFRmc90auFAjCkTvQaZQU9fsQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712959804; a=rsa-sha256; cv=none; b=i0vPPjl5rVctXtKg8nSEEUVzNmuh6WEzXvsH1X8IjDHD5D5vyNMhtUSVqQquXBczxbg4Pw jT6RjL0JGutKjn92xyAZOu57cXBZBplZPT6hxKCbISHbbGY9dVuTV8/ZL/6uokyJ0J6QDq 5oo/fW94E6B4OOoTNXeOFRMqZpvxey8= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UwIvzHSy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="tb/VBRwi"; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UwIvzHSy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="tb/VBRwi"; spf=pass (imf17.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 74C521FDAC; Fri, 12 Apr 2024 22:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712959801; 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=WBHJZW5qfzOJEsB66VilWK9Gm3cfveDWqnlEOgZ9QAU=; b=UwIvzHSyksJ9pbN02KwVoLTqOo0OxXSJmlIob5bzMORtmB2XHeoFXNmiX60m1nO4J8l59D caI6GYXW4mIiRsFILBET6ONAeF0SDc6sfizxjdPaLpomLXGICrSGBWemyGBS3qHgNf9A+p 8BPFhTdRn+tPlTSgr2zc6AIAyAXUhoc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712959801; 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=WBHJZW5qfzOJEsB66VilWK9Gm3cfveDWqnlEOgZ9QAU=; b=tb/VBRwiBmeEnpdxoiWqq1gNHfRee5wyirQjl9rXYMkj3p/C0iSe7saOuIB0rbdZQ0845Y mzaQzvbiW0VtDwCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712959801; 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=WBHJZW5qfzOJEsB66VilWK9Gm3cfveDWqnlEOgZ9QAU=; b=UwIvzHSyksJ9pbN02KwVoLTqOo0OxXSJmlIob5bzMORtmB2XHeoFXNmiX60m1nO4J8l59D caI6GYXW4mIiRsFILBET6ONAeF0SDc6sfizxjdPaLpomLXGICrSGBWemyGBS3qHgNf9A+p 8BPFhTdRn+tPlTSgr2zc6AIAyAXUhoc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712959801; 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=WBHJZW5qfzOJEsB66VilWK9Gm3cfveDWqnlEOgZ9QAU=; b=tb/VBRwiBmeEnpdxoiWqq1gNHfRee5wyirQjl9rXYMkj3p/C0iSe7saOuIB0rbdZQ0845Y mzaQzvbiW0VtDwCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 281641377F; Fri, 12 Apr 2024 22:10:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Xh0EBjmxGWY/dAAAD6G6ig (envelope-from ); Fri, 12 Apr 2024 22:10:01 +0000 Date: Sat, 13 Apr 2024 00:09:55 +0200 From: Oscar Salvador To: Matthew Wilcox Cc: Miaohe Lin , Jane Chu , linux-mm@kvack.org Subject: Re: [PATCH v2 07/11] mm/memory-failure: Convert memory_failure() to use a folio Message-ID: References: <20240408194232.118537-1-willy@infradead.org> <20240408194232.118537-8-willy@infradead.org> <2cc02f91-fbca-4160-9f31-bfb54f882f08@oracle.com> <1677b7a8-179d-4e4f-a7f3-5d6244586cdb@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Action: no action X-Rspamd-Queue-Id: 87B6D40017 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 9a3tqfqzt8xdmsoxb9o7hypziscnb8zr X-HE-Tag: 1712959803-204267 X-HE-Meta: U2FsdGVkX1+UEHoCRtbA/vEXf2JNpF1sR228p3fI0OvpwoIzddgfN/u79k0a6SXg/g8mzELI0eD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E+YJvr8Co7PHVu3vuAgIVhLin0vLc6JZx2mxfPKH+XBRhCpzZe4DcJCfBS6XqTs8o9zMdFx0ElkNzw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000017, 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 Fri, Apr 12, 2024 at 08:48:11PM +0100, Matthew Wilcox wrote: > Yes, I think you're right. As the MM handling of pages has evolved, > people haven't kept memory-failure uptodate. That's both understandable > and regrettable. We kind of had the same problem with memory-hotplug, but we managed to get it up to date. > I don't have the time to focus on memory-failure myself; I have a couple > of hundred uses of page->mapping to eliminate. And I'd want to get a > lot more serious about testing before starting on that journey. > > I do have ideas for handling hwpoison without splitting a folio. But if you want to recover those pages within a large folio that are unaffected, you will have to split it eventually? And so, if we can make sure that the large folio has been split, and subpage cannot be part of another compound page afterwards, we should be safe? But yes, I can see why. Right now, if we fail to split the folio we do not handle the situation at all, we just mark the head as HWPoisoned which is pretty unfortunate because we just lost the chance to contain the error in the subpage, so we flushed a large folio down the toilet. I would be interested to hear those ideas, as having the chance to handle that would be very beneficial, and more deterministic. Thanks -- Oscar Salvador SUSE Labs