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 6EBD3C433F5 for ; Tue, 15 Feb 2022 12:51:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 023666B0078; Tue, 15 Feb 2022 07:51:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F15B96B007B; Tue, 15 Feb 2022 07:51:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DDD716B007D; Tue, 15 Feb 2022 07:51:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id CF3206B0078 for ; Tue, 15 Feb 2022 07:51:52 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 93E4B216DF for ; Tue, 15 Feb 2022 12:51:52 +0000 (UTC) X-FDA: 79145001264.04.E565D62 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf08.hostedemail.com (Postfix) with ESMTP id 07686160005 for ; Tue, 15 Feb 2022 12:51:51 +0000 (UTC) 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 B21DB210F3; Tue, 15 Feb 2022 12:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1644929510; 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=S+8iMfkRRARGsD0orx9twPu99T6CLgm/4CL4ZhfS0rw=; b=fuLzBF4iSfHcrO3zcdBZEWw0azxcjUdoUt9/4J7kSwK1gI24ykuvkR6JOT92xmTG/fFrrx hC6IDAZzNR9/tORNVdSzueyco1r27Dk8/Dqpcj12DqADUlNhMCyPShG7Z4krv4jLGIPd6x K5PqWOeWa83OHa7+qRtCsa/F9Ki0a1Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1644929510; 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=S+8iMfkRRARGsD0orx9twPu99T6CLgm/4CL4ZhfS0rw=; b=WQkgFac5adSqfl8qFiozrYraCigy7JEgbNDLsXdtZK3k4DS2+O3UolPQ1fyNtbBldO2BrK qfnHyR6BNvWryNCw== 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 16D6C13C75; Tue, 15 Feb 2022 12:51:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id DnguAuahC2I+bAAAMHmgww (envelope-from ); Tue, 15 Feb 2022 12:51:50 +0000 Date: Tue, 15 Feb 2022 13:51:48 +0100 From: Oscar Salvador To: Rik van Riel Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, Miaohe Lin , Andrew Morton , Mel Gorman , Johannes Weiner , Matthew Wilcox Subject: Re: [PATCH v2] mm: clean up hwpoison page cache page in fault path Message-ID: References: <20220212213740.423efcea@imladris.surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220212213740.423efcea@imladris.surriel.com> X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 07686160005 X-Stat-Signature: o3ckjfpt6n7jqxyhdhyrignzri95fx3i X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fuLzBF4i; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=WQkgFac5; spf=pass (imf08.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-HE-Tag: 1644929511-606806 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 Sat, Feb 12, 2022 at 09:37:40PM -0500, Rik van Riel wrote: > Sometimes the page offlining code can leave behind a hwpoisoned clean > page cache page. This can lead to programs being killed over and over > and over again as they fault in the hwpoisoned page, get killed, and > then get re-spawned by whatever wanted to run them. Hi Rik, Do you know how that exactly happens? We should not be really leaving anything behind, and soft-offline (not hard) code works with the premise of only poisoning a page in case it was contained, so I am wondering what is going on here. In-use pagecache pages are migrated away, and the actual page is contained, and for clean ones, we already do the invalidate_inode_page() and then contain it in case we succeed. One scenario I can imagine this can happen is if by the time we call page_handle_poison(), someone has taken another refcount on the page, and the put_page() does not really free it, but I am not sure that can happen. -- Oscar Salvador SUSE Labs