From nobody Sun Feb 8 21:26:25 2026 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 38424211A3B for ; Fri, 10 Jan 2025 18:21:57 +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=1736533319; cv=none; b=tBSsbUw+0pzzesV1JNxY4d3yposf8h5N6jB1tsUZTtKRWj+LWJlawbBlcFaX9AIkecT41yh6XxckmRP4JIjtBWoMaQ83xMuyoQIswYAsiziacxsQ7E/FexQ1oRI5TT3EWjzenONPrnUwDR8DNEnfu0tHZfrgw3x2D2uR/lUlzRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736533319; c=relaxed/simple; bh=+MWWPlqCmvUhj/Rtce7ZzsYKfy/qc8fWZpevL+AhAxo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UTDxzEMtx6bMPNxN608Di3XzmESeoETAFVAcIKgBfFaWKp6ZWPlF2fkBopC7phat2xejhdbm1cIG5jOu13lWrO+usMTvLq+q95qfSgICwCWo0fuVDPn/wzGjPIMJfwGU4EN/Jbtk56Pjr3fytSLVHrUVrZmxZjklTdXY4zoswt0= 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=f9IdTpeV; 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="f9IdTpeV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736533317; 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=QDSAyCtg1fX0bp4z+4H4qfpYEbFsAwRyrL3Z8KQqD4k=; b=f9IdTpeVu6jvhsYpXnBYTMLzGrv/yYcyCyd9GPSxr/QD1NjB8qsCZjxKSnr5TzDIOHGyXN Qz5WsaOKwgB3R39v+tZy1hWfTBfoJLHJ6pQ4w8e29HTKF+X84PnN7HqIm7ulcr8kMII7a/ tsKNl5T/6Z0lY4oFMiLBP0+QH4/xJfw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-Plru_hO3PSSmiR0Ec8oarA-1; Fri, 10 Jan 2025 13:21:55 -0500 X-MC-Unique: Plru_hO3PSSmiR0Ec8oarA-1 X-Mimecast-MFC-AGG-ID: Plru_hO3PSSmiR0Ec8oarA Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-436723db6c4so16305345e9.3 for ; Fri, 10 Jan 2025 10:21:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736533315; x=1737138115; 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=QDSAyCtg1fX0bp4z+4H4qfpYEbFsAwRyrL3Z8KQqD4k=; b=kJK9972uB+Rw9UU5BUq2I99E19DvpJwVSBwnsHfm0aG3L1dBztRnJOhM4YM/JSjp2c O0eliuXkjG+XnW93/7G9/yj7FlsJFkQXCZTuUN495qOHAdaHozaHiNo216I5mewo7ZnP 1sKxud5x0n4nt4mBz0H/C0yUYbjI3AAoHbR7X2GF7mUqWOJWLxxIPj/1yXQDirsccf93 AlSYkfZ1i8tvlTPVR65pE0BSaCnU9tIPaHDM8nXVLOaoF3gqnqjpeLJlrOr1eX2aX8DJ eHr0oVCTDc8u0VLtBz8P2bVR7X5GJYoSyEKNcLrFH+D0JdXgva/0C+q5NRRGJDOOdKP2 u7CQ== X-Gm-Message-State: AOJu0Yzb/nZHC3nNdwnI/b0GD356mrIf7OXjBBWCfAGKDDAufaIBV2Rc FTW9x3+pjVmdXG7XTFbqdpeE1KEC1NncgfWv5/Xt0gOMNTsWei8xIPwQO4e4D1omdArpNmyFmum FEnLXwPxBs0Yc5R3idKfDIdHS7U3xdGjpi4Ic89bRuxCzunRo+N6Y/c94ZnpPt4cigzLW5lxZOF NFEaO/6WIqa0NAV11qKP9Xc2tOfuiGwcMqI3hegPhWQAr9 X-Gm-Gg: ASbGncs1zrnN4OcOoAmQzjgD0/RRGv/svcz0dgPHSTKO+3Bk6p0VRAbRJoK6WG8wEjd O7f+Xacjc9Qh4d4h1UXMdZfJ8mueIEA1g5rKLKB3bIu3qXN6ffp1wqWMO+8Xfeko/jLSy9Sjsyn jJBGmrSVzaLTcQEF31j4TX4p+eEGeCxWTeHAc8wU9gcE6UqH+i0VnnhorrV8jicmVOxeGU1MlbR CrrwWYDM/NwkXYZO5vqNz3AWP2WbSIyVJOjNe9t081mJ336tY31DQj1zl7FLpc3NsK98B6nM6K6 GzURwSJtabvOlMzRHRtPVkGb6rDN/a9SDZ943E+yKA== X-Received: by 2002:a05:600c:4fc6:b0:435:172:5052 with SMTP id 5b1f17b1804b1-436e2686492mr96784455e9.1.1736533314849; Fri, 10 Jan 2025 10:21:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEo3WdtgynR79gKF0TnPXRhuxMI+Oij1Fl43vOkRd3CWqDDLxRyW9C4c5GgRBUMq5QKHX25YA== X-Received: by 2002:a05:600c:4fc6:b0:435:172:5052 with SMTP id 5b1f17b1804b1-436e2686492mr96784245e9.1.1736533314489; Fri, 10 Jan 2025 10:21:54 -0800 (PST) Received: from localhost (p200300cbc708e1004f41ff29a59f8c7a.dip0.t-ipconnect.de. [2003:cb:c708:e100:4f41:ff29:a59f:8c7a]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-436dd11ddfdsm77133265e9.1.2025.01.10.10.21.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jan 2025 10:21:54 -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 v1 1/6] mm/huge_memory: convert has_hwpoisoned into a pure folio flag Date: Fri, 10 Jan 2025 19:21:44 +0100 Message-ID: <20250110182149.746551-2-david@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250110182149.746551-1-david@redhat.com> References: <20250110182149.746551-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. Signed-off-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) --- 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