From nobody Fri Dec 19 07:43:42 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9220E22C33C for ; Mon, 13 Jan 2025 13:16:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736774202; cv=none; b=oCVRZkiW0Pxm89kct7joXOag0EUlRhpLm2OBsOQk79yDsRKAuukJ/2jhl+NwNcr9GTQPvUJPZhf1xk7pY5CDl4GqkQytoVjW5iSJIxxMfMuXpux9LykhvkXYiRt9D6kQDSAmbtL32QA4FJ1zUI6V7OOQk6H04aeV+6s7lSbsNFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736774202; c=relaxed/simple; bh=rjOYsYAtuUV4kb7e8bPEkOmuK442dmDaiwFSYAD4mVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sD+CsgAIr7Ff6Kd1ihp0P2aIPOZUi17zmI4+Hu3GSz9L/T1gr2iAWFGMCNn4T0To9ZmFAfgXkj1xNnUzFNs6dWdRFeBCr8UIO2r4R19UaVyOzRvKpiUV0zAzbvP40oft6ZmlgkZxfGgcSrXOnN/eUNuED81PxeLmO/QF5yjrYTE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UmcwawSl; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UmcwawSl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736774199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yqxlMuEwJ96RDEbbwPDjzSu+ESMvaexzxAdOoodpgX0=; b=UmcwawSlDiXjGOz+7XX/Yw9W/r0HtSmJZx169hoBNMVRCz0H0aqdMP2bFLpUjA1MukgR7F /GZiocpM7A36WEgV2YdFHo8WvJS4ov2L/r/FhDKMuDTBpSJsTovAWLpx0zDFZr8ksfSAJm WruDPvagStfrDaEd/nKNGzQcRdP8Ezw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-37-F9fBiKDVOR6aGPEyehZpuQ-1; Mon, 13 Jan 2025 08:16:36 -0500 X-MC-Unique: F9fBiKDVOR6aGPEyehZpuQ-1 X-Mimecast-MFC-AGG-ID: F9fBiKDVOR6aGPEyehZpuQ Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-38a2140a400so2853894f8f.0 for ; Mon, 13 Jan 2025 05:16:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736774196; x=1737378996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yqxlMuEwJ96RDEbbwPDjzSu+ESMvaexzxAdOoodpgX0=; b=d2THTKCfs4Ojs5AZhwdHdECMCfRl9VVOIhyybgXotRvn4ACDfhQEMI6JazE/b+f8am 7v1y0lcPPPd2x5kReUT3p6M1pn0IXrDBTpv7dYbrkN02Ew3F0SFLJlqgZhWAvUv0ALw2 1thlrfi4eVIgW9zAc7hareuA4ThCIUJLPvC9SzNYhOP/dr+Tka9a8AN/U8C//kB0dcly Fg2shYLf382Ugt0GRZf0t1ofajGjpSQnam9e46jIUFwSLjkZ1U7H45c+fFM4zvNBKU89 qgpXzc3SDRDUk6HtxDSOgloIWXCUUMro0GpRsS4tUqnVMWs9ZILttYvdfFkR26lRtH0w mavA== X-Gm-Message-State: AOJu0YzXuSGn25NGvrgdcEfxrPcvMNU5dIjMnWSSqB1GuyofaHwYODHj 4sRYpo5gdig0wg1OZd0VFn2Psr9Uml7ixmFRhXlnmpVu5Vdbw8siWu/jwi8enp/5cocO+8Vm0pO lXTN8C18dZJ2uWE+PQ/gZkabONBL42sCQy27F9T4cl3hTMvLLnaFA5XlWe1agm3dyCdRRoo+U+O POhGJtrTT2UZ5+AI/lWG6ps+OGx7pdF4KExV2LijVD04h4 X-Gm-Gg: ASbGnctndq/lqKesjiMnspitEyMkhtdLmk+W2ivUI5UmOoedrvUfbKn/nhGjAnlkYkm MvD09iGQmarT/ggrApQxuwzOPoNEZ8EE7GQPwbVSw9PXVywE+SmWlkIjKQ0ojN1NWeorSLUQmeT jwiJd7YCCTXypUIkjJ5kDXfxUMEXXbVaizxy+/r2DDO0yuYMU0TNqi1MiuV1sXv0+ayB72QLx/F KfDB/lTRj0IpYFmEO5JLwAkKY2XE3zMQUJuqfQXGM+S/cROUfJ+ X-Received: by 2002:a05:6000:4b0a:b0:385:fae2:f443 with SMTP id ffacd0b85a97d-38a87313975mr18780156f8f.34.1736774195718; Mon, 13 Jan 2025 05:16:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwBMYQqXPQxzZdc6FGJ8e2Lbj3PmWZBYhXw8lnFx0RiF7sjzN8pyjkFTORSuuscZKg5QTaCw== X-Received: by 2002:a05:6000:4b0a:b0:385:fae2:f443 with SMTP id ffacd0b85a97d-38a87313975mr18780120f8f.34.1736774195249; Mon, 13 Jan 2025 05:16:35 -0800 (PST) Received: from localhost ([2a09:80c0:192:0:5dac:bf3d:c41:c3e7]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-436e2e92dc4sm176071985e9.39.2025.01.13.05.16.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2025 05:16:33 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Muchun Song , "Matthew Wilcox (Oracle)" Subject: [PATCH v2 1/6] mm/huge_memory: convert has_hwpoisoned into a pure folio flag Date: Mon, 13 Jan 2025 14:16:06 +0100 Message-ID: <20250113131611.2554758-2-david@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113131611.2554758-1-david@redhat.com> References: <20250113131611.2554758-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Let's stop setting it on pages, there is no need to anymore. Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 6 ++---- mm/huge_memory.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 14226d6bd6f84..3f6a64ff968a7 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -948,11 +948,9 @@ TESTPAGEFLAG_FALSE(TransCompound, transcompound) * * This flag is set by hwpoison handler. Cleared by THP split or free pag= e. */ -PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND) - TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND) +FOLIO_FLAG(has_hwpoisoned, FOLIO_SECOND_PAGE) #else -PAGEFLAG_FALSE(HasHWPoisoned, has_hwpoisoned) - TESTSCFLAG_FALSE(HasHWPoisoned, has_hwpoisoned) +FOLIO_FLAG_FALSE(has_hwpoisoned) #endif =20 /* diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 2654a95487499..3d3ebdc002d59 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3290,7 +3290,7 @@ static void __split_huge_page(struct page *page, stru= ct list_head *list, /* lock lru list/PageCompound, ref frozen by page_ref_freeze */ lruvec =3D folio_lruvec_lock(folio); =20 - ClearPageHasHWPoisoned(head); + folio_clear_has_hwpoisoned(folio); =20 for (i =3D nr - new_nr; i >=3D new_nr; i -=3D new_nr) { struct folio *tail; --=20 2.47.1