From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A0183B27CE for ; Thu, 17 Sep 2026 20:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789677915; cv=none; b=nhjtB0Ri6mtRSDyxg5qIkp8Fg3Z3xfVqJpIhKJVLVm2p2Teh2T1kSdkV0N9k9Fxpqn1GiBFfXIa8tFibeqfmJYODDkAOZPhFhqyLIH57ZmxXO1COcgiLW3s1a8qHADsH9uvXWWoz4ynz9F4YC/FG+RlWrCMjEr82mqPt95ZXBfo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789677915; c=relaxed/simple; bh=VByVeEjI4LUQrNUSvfcdQ/qkaw2W/Fj0TZtQKNhauZ4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=HWEUpN95wJIeZy8gpEXFIXvnuKFGgdqV/ZnjNUuDwYyQmrR+4/UgBWXp03EHE1f9bQyymPTVdXW7betKvnM6bucYnzLqQX0YWRTGkE4B2YKAU+E40lBcK43FdfH9ItjhBnVcRde3rrGCFJjlVCVoe0swIvt32cuPcLmttb1UQyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--wyihan.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=MRqonI+n; arc=none smtp.client-ip=209.85.216.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--wyihan.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MRqonI+n" Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-39de1f85cb2so110305a91.0 for ; Thu, 17 Sep 2026 13:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789677909; x=1790282709; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JxlCNYOwsW45BnQIn3JTG+O/SEl/6G4eXS+I5oaCDnU=; b=MRqonI+nHeywoLMhrBjnzBL3OVdhM5yIzLFh7gn568V6uex2cDxSGywudR31v3ApUG Vcr6lmKCoHul00MV+iRxo8IhueDX4NjW428DUTv+VsqhA7W9/tr/9N0XpWQ/JXrdoehP boEswlQrPr5jdhI+h/c/Jzq7/BjU1cxex2I4l+RsBXO3kg7zQxYNtBczOZB7vKB5t6/f 2Ba+U6rup/kxnLQPDzPl50OGsn1OJq/2XbFfnXyGyIiwJTSUTWICFH4s2i2nUlqr+9EG d/+TcmzJl/U0JA1ifPAXhiLDdF3ZfyT+ZJIFlYffTuKZkTu0+zzsY49+4ZVdwhgupqzS z7JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789677909; x=1790282709; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JxlCNYOwsW45BnQIn3JTG+O/SEl/6G4eXS+I5oaCDnU=; b=2OE5fODDxe3Fu54KNFB6w1SgoaFXgv00S7zQDgICbPwTsUhpzqTducJIaGGTkkzYGP CjJzDQRhlLOckRs47an0PzU266sMX2/EOfCguy55ssTSzLOaOSQ5h9WcKF6E/JMzxDds j3riArnf4GbAI2ZAtpYsksCHq3q+rP/42usgxX4DwFar+mVSE4TsvxqwAgLd4/OmZvXb TKFs+M4kdWhyb78WnDDHI6HSbvNd46T+2kT30PXN3M+F1TotA5l0wt1cavvEHKm+G3HX rUsjmAT+NDfDBb5ZRRsgPdcGBN/3piCtGtrpr2AlraqpO2zqdnMvBhjfTYN+eL6n77LO MOsw== X-Forwarded-Encrypted: i=1; AKwUvBwTCFNngpkB3rDJyQSJID/wDk+QL9LsDBmA0iM80ytIwxIZq2VptxN6MZWMM8kbY2PfACpqgzmO0Sa+6/c=@vger.kernel.org X-Gm-Message-State: AFuF++l2apV9ioC5Ys3kQyhzcYViNVUKkJKX+9L1K52qvvIHcFf+YhGT v5Y2r4NDSZs1qMthQ2aX3jZ0rLO4iTESbAmJT0tqn6rLGaUXY3QzurJuzTU9frqFXoSqe27/H3r ptPK7Dw== X-Received: from pjyd8.prod.google.com ([2002:a17:90a:dfc8:b0:39e:4bdd:a2c8]) (user=wyihan job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3d8b:b0:39e:410b:bec4 with SMTP id 98e67ed59e1d1-39e54dca306mr707986a91.11.1789677908717; Thu, 17 Sep 2026 13:45:08 -0700 (PDT) Date: Thu, 17 Sep 2026 20:43:47 +0000 In-Reply-To: <20260917-memory-failure-mf-delayed-fix-v6-0-4b00856b5364@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260917-memory-failure-mf-delayed-fix-v6-0-4b00856b5364@google.com> X-Developer-Key: i=wyihan@google.com; a=ed25519; pk=cRi0fKzS5BMxlHyHY2pJv3w/1zcgfYKr6EYGYppdMYc= X-Developer-Signature: v=1; a=ed25519-sha256; t=1789677906; l=2541; i=wyihan@google.com; s=20260319; h=from:subject:message-id; bh=VByVeEjI4LUQrNUSvfcdQ/qkaw2W/Fj0TZtQKNhauZ4=; b=26Q9nOB/cKS3IbZahb3B67Qv7bStXKlTukEhrVZ3ZTwAxnSeS1vUPLqyUMVeJYRB0EYtlJR7z gJoC/MAIdDNALDdHkcigEox0KlId9ndvnjep7WAdkFOdJ368ZU4Ehy+ X-Mailer: b4 0.14.3 Message-ID: <20260917-memory-failure-mf-delayed-fix-v6-1-4b00856b5364@google.com> Subject: [PATCH v6 1/5] mm: memory_failure: Clarify the MF_DELAYED definition From: Lisa Wang To: Miaohe Lin , Naoya Horiguchi , Andrew Morton , Paolo Bonzini , Shuah Khan , Hugh Dickins , Baolin Wang , David Hildenbrand , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Andi Kleen , Hidehiro Kawai , Rik van Riel , Yu Zhang , Lorenzo Stoakes , "Liam R. Howlett" Cc: rientjes@google.com, seanjc@google.com, ackerleytng@google.com, vannapurve@google.com, michael.roth@amd.com, jiaqiyan@google.com, tabba@google.com, dave.hansen@linux.intel.com, Lisa Wang , Isaku Yamahata , Xiaoyao Li Content-Type: text/plain; charset="utf-8" This patch clarifies the definition of MF_DELAYED to represent cases where a folio's removal is initiated but not immediately completed (e.g., due to remaining metadata references). Acked-by: David Hildenbrand (Arm) Acked-by: Miaohe Lin Reviewed-by: Ackerley Tng Signed-off-by: Lisa Wang --- mm/memory-failure.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index aaf14608b30e..e698d0e9711d 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -847,24 +847,25 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn, } /* - * MF_IGNORED - The m-f() handler marks the page as PG_hwpoisoned'ed. + * MF_IGNORED - The m-f() handler marks the page as PG_hwpoison'ed. * But it could not do more to isolate the page from being accessed again, * nor does it kill the process. This is extremely rare and one of the * potential causes is that the page state has been changed due to * underlying race condition. This is the most severe outcomes. * - * MF_FAILED - The m-f() handler marks the page as PG_hwpoisoned'ed. + * MF_FAILED - The m-f() handler marks the page as PG_hwpoison'ed. * It should have killed the process, but it can't isolate the page, * due to conditions such as extra pin, unmap failure, etc. Accessing * the page again may trigger another MCE and the process will be killed * by the m-f() handler immediately. * - * MF_DELAYED - The m-f() handler marks the page as PG_hwpoisoned'ed. - * The page is unmapped, and is removed from the LRU or file mapping. - * An attempt to access the page again will trigger page fault and the - * PF handler will kill the process. + * MF_DELAYED - The m-f() handler marks the page as PG_hwpoison'ed. + * It means the page was unmapped and partially isolated (e.g. removed from + * file mapping or the LRU) but full cleanup is deferred (e.g. the metadata + * for the memory, as in struct page/folio, is still referenced). Any + * further access to the page will result in the process being killed. * - * MF_RECOVERED - The m-f() handler marks the page as PG_hwpoisoned'ed. + * MF_RECOVERED - The m-f() handler marks the page as PG_hwpoison'ed. * The page has been completely isolated, that is, unmapped, taken out of * the buddy system, or hole-punched out of the file mapping. */ -- 2.55.0.1082.g2b9226bbc0-goog