From nobody Mon Apr 6 10:44:16 2026 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 C7FA24035DF for ; Thu, 19 Mar 2026 23:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773963057; cv=none; b=NRpOf1zWKif7vt/5/esKqYMhIJKWKGehMhZjr4ofa1vlauY4QrBH1snEac3DgAnmWP1AtUm9c3ZbbJyNsJn2Pdui8ZimLHRH8eAqUVOwRceoVvgi5wbw6gCK5fpSAuedy/H6Ab5X6cdZCLJD4a8XpP5mosVEKvQM0myEsLQ/DD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773963057; c=relaxed/simple; bh=wOqfNAc1NvD9OIIK2IFuT9hSXcRKmOriHgtHRjPE5Bg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=t69UGEAbA3iXT+li/hwIv91B3886ppESaGSxYZEHxKSUcWhUDRaf4J0PrEPWpGyTUDOnoKZlfCZ6t8/DUIGHqyRGn0oZbjIjoLgL4N7CJhc0c8rWaEEaLax3B7YQpOIRUjn5LxyGs4/WXonQ9Cmso2ba1ir+oTIGEC68zk9RnYo= 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=HGaV+NDi; arc=none smtp.client-ip=209.85.216.74 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="HGaV+NDi" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-35b96fbfc64so638398a91.2 for ; Thu, 19 Mar 2026 16:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773963056; x=1774567856; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=sCHbx83iK3r3PTq425PBvHDhuCzYUl5sN2W6Ton0yI0=; b=HGaV+NDiMEwkOvFzpApfF2e5KIRVd0goCxK0Vx35cSeGT4nTdQxZDfuD+EonWkY5xl H6sjXYoeqhZtC5aOe4qNdluoVvTV94G2nOK7uDVTzUa/EzbQTvA3DPyS9uwt/SJWNZxD 01++syQG2Jb9rOkselcyNyfm+cdlcSOtJiW3qpzu4bBsRCQ7YyQYJiaVoRwiJPRFRFu4 9b8eR10pOV+FdQOHr/2UI8eChLDSsIAIE7cKqLUahZVjtTS6ZH2/bEqp1UfidqWMNRPy deXTlBic0mkjlrHzxSuabHLHjDRCmh/p9xAUqiagBUXbQMsJ/nWKVMpFXmUWO1IchJDR kQrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773963056; x=1774567856; h=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; bh=sCHbx83iK3r3PTq425PBvHDhuCzYUl5sN2W6Ton0yI0=; b=BN1MwEy4m+JXvjz47E0nDFIhOjY7LeN1kJ9m7eyMdOF1/OBG0TLdBErCpFhQozkvSj a5d4vPN5pu5IhWwPrsKmSxFzsYap+uDZ0DHX0xWiIIFETN1DqNzH7wLT+Bm5ux6aoRUT ajaZBobJlPAZeUR34judUYkEeXTdC+ZyVBtmN6PsyxMsnM2jH/KswdsfANMC3gK8l1ns ptYBr7NyiPGeqtOIuO2MPrKxvchpYFUhPhP+hiW1NIm/+zOCE0lNnR1l2iR7uPOBCsZS /E4QKm6qNOMVbK5oBKMr3cPRaDjgJABMJnin+qWHbUqwNKRazXemi7kEU9XiSQ0S55co NfLg== X-Forwarded-Encrypted: i=1; AJvYcCXj0q/x5Ry8WbCAAm0X6OcRm26boMInQG/SszHg5zm+XZAnFLcpGCJgwVfBrKWJQWiL91kJl50WYF+vAbw=@vger.kernel.org X-Gm-Message-State: AOJu0YxORhCNPDQk0iUiHblPR9IpdpsBFmgKy0c3FLqF2Fh+UcB55uiq ed1yQv4uVia6Sf3MvDkd/O1C66qPPRsK0+D47s7av82POtdB/DIa7WSOM+m9ZyTzuyRIX/fkKlh X46BZMQ== X-Received: from pjvi6.prod.google.com ([2002:a17:90a:dc06:b0:35b:9c1e:a503]) (user=wyihan job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3e44:b0:359:9158:7459 with SMTP id 98e67ed59e1d1-35bd297b148mr776486a91.0.1773963056138; Thu, 19 Mar 2026 16:30:56 -0700 (PDT) Date: Thu, 19 Mar 2026 23:30:28 +0000 In-Reply-To: <20260319-memory-failure-mf-delayed-fix-rfc-v2-v2-0-92c596402a7a@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260319-memory-failure-mf-delayed-fix-rfc-v2-v2-0-92c596402a7a@google.com> X-Developer-Key: i=wyihan@google.com; a=ed25519; pk=cRi0fKzS5BMxlHyHY2pJv3w/1zcgfYKr6EYGYppdMYc= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773963053; l=1352; i=wyihan@google.com; s=20260319; h=from:subject:message-id; bh=wOqfNAc1NvD9OIIK2IFuT9hSXcRKmOriHgtHRjPE5Bg=; b=YPNL8jxwq4kWmS/RsAYB4N4wCDzvDeNXcDvt36H56rqlisScdhaT3wHvfkS9+Dbew0Z0kkT6f pQOjgJ05T0TC8Im8YK9ko5dIngtrrkkjKMNkE/VDDjMrdxjo70z5Djw X-Mailer: b4 0.14.3 Message-ID: <20260319-memory-failure-mf-delayed-fix-rfc-v2-v2-1-92c596402a7a@google.com> Subject: [PATCH RFC v2 1/7] 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 , Lorenzo Stoakes , "Liam R. Howlett" , 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 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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). Signed-off-by: Lisa Wang Reviewed-by: Jiaqi Yan --- mm/memory-failure.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ee42d4361309..4f143334d5a1 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -862,9 +862,10 @@ static int kill_accessing_process(struct task_struct *= p, unsigned long pfn, * 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. + * It means the page was 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. * The page has been completely isolated, that is, unmapped, taken out of --=20 2.53.0.959.g497ff81fa9-goog