From patchwork Fri Jan 10 18:21:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13935193 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 C5614E7719D for ; Fri, 10 Jan 2025 18:22:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D98036B0099; Fri, 10 Jan 2025 13:22:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CEC786B0098; Fri, 10 Jan 2025 13:22:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B18AF6B0099; Fri, 10 Jan 2025 13:22:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 8326E6B0089 for ; Fri, 10 Jan 2025 13:22:00 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 380F1120DB3 for ; Fri, 10 Jan 2025 18:22:00 +0000 (UTC) X-FDA: 82992361200.10.C09F5C6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 0C0B84000B for ; Fri, 10 Jan 2025 18:21:57 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=HRfpAEcH; spf=pass (imf12.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736533318; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QDSAyCtg1fX0bp4z+4H4qfpYEbFsAwRyrL3Z8KQqD4k=; b=HI1SXveqns1lNlSYQKWC79a5nuQZptJJ+/Ywqz22drtCagXs2c/qL5fTttvQNUTKNQ3KxT YfAHftKIwUtlxJ4ZfsdMwnz0Tgv0iWhhKjjunB1PXXCoq61I+JxVbhbTLIXbPRhxO320Cb JymuvBrAyT2mW+TLC9JDlKh6GmHuXhg= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=HRfpAEcH; spf=pass (imf12.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736533318; a=rsa-sha256; cv=none; b=VvOWy51Vxk+KgXhxPvlKDHCmbciDTzKOoCmEM6QLr4vHGxCI/FlMf033DX8QBn13S69fhu V+vHw8kvvgtlcIJNkuPWM0s5l2Y2qRZHQZPM9y5o4kqeOm2i/+IFYuBNk8BgaZ2a6ZYlkJ lkFSGsAvDWGbzoREFug0i7RYG5YWPdQ= 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QDSAyCtg1fX0bp4z+4H4qfpYEbFsAwRyrL3Z8KQqD4k=; b=HRfpAEcHs8K/M6ggC0x6XehkiQHsFpQ36okMFSaEDCO1N42/g46Q1xSasB1AAn6qVLXrtG FiijQ9xGiRkHZMc938RfZ0NDKs53A5MIMC6wd9iJZVndJNMeOG8xa90O92jVum+K1+3UtK OWvlO56D5oszBLD8NdiQ8+4BtH7fJdg= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-BbkT2IdoMpuqWlV_vATsUQ-1; Fri, 10 Jan 2025 13:21:56 -0500 X-MC-Unique: BbkT2IdoMpuqWlV_vATsUQ-1 X-Mimecast-MFC-AGG-ID: BbkT2IdoMpuqWlV_vATsUQ Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4361f371908so16447365e9.0 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=CSA06NEo8t/HoTf/KRpbLFNS1hgOiny3xu1nYTTPBAawqg3UEDf7YQPBDZme7FQnR+ WA2lbNVQW63XUc3EvPRaqNOS52t50NLgo4NRcdSKLiEvRkcnrqC+BWF8gWtDmGbnbD8M JJ4b1yr+B0FJLMz1XjMSMTRAKG+lfGOah2ZZK/N2Bgnfry1+gSEQqCfk7Wm7OZucahsK xlAStYPW/8DuwIW0lCGtHxNmj4BGoRDyhBC9Uoyg9uUCmw1oboI5JKCuXNSZACqEcjA+ 1hohjwI//YTTcJOaTdWCg0C3PW6B/XgKkltbIaun2PLIGzWz9DZ0ZlyN+9pj56U8N3WA lC9g== X-Gm-Message-State: AOJu0Yz+LzY+i8iub67SYmJ8yz+vAjXbVLWDagyhX5P1no+BmHvCvMXY vYw6m02hHozr1JvXY4qUY4FgNQOk/WhO0k/I4j9xh2h9XzkMqTZXF3tnkmDPdo3A0zb9WMdfINp tWPi2pj5ISKCi7dOeegMownTXVz6dXmuPWVS9mRTvRNHHMrwQ X-Gm-Gg: ASbGncu8GU3KuO7wZEVArLqrQfn4lSP6E62fnVQ7C5Xm+JAUKFPqr9IQa26BsFwIYwy qd+57orh12Gy24Bswe4rl92jr/rKteQEWFCdl5/d3JL5+renGRDBdSBjvcXwNE/jYPtuXjZQ5L+ venuaMFg3VtZv/nrNgLS5quFqph5QEdJkX9Ri4/32dAohcNd3+i3Sf4RaClNtz24ZYrIaMJhMkY XvfEJzjx4ZgfUzMm3lGRxNfBKevk2yJcR/u/ptq6R/Kz4uwMqWGLeoy2oU91V/993F8e149Gvzx jFUcqJcfGeV8DxtYlX9HzqhBKXPyjxyup85OdLw+HA== X-Received: by 2002:a05:600c:4fc6:b0:435:172:5052 with SMTP id 5b1f17b1804b1-436e2686492mr96784395e9.1.1736533314811; 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> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: M4thZsqLTJLqfd6uT_jvmwgGMJ_dytBRza7C_GD5wSc_1736533315 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Queue-Id: 0C0B84000B X-Stat-Signature: u8axbmi3zwok73syk8tnkx9u8yjnkfh1 X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1736533317-125374 X-HE-Meta: U2FsdGVkX1+ZDXiBnbmdO2MwW2EOo/LgEKZ9k2qjwQKnzYZ+R0stwa4+5FjZO3ZvyVoopFfjHMkkhDIbKsa0lOyDGToBKs6je9WCIHj+W3TC1H+sIO87Y0wNr/GAlMhpi93BgzmqqJBGKGW54a5JuQO3JuMJBGmNNyPeFI/laYiJ5fZOxW+uQIgN5eXG7STewKTafqA5WSHRmMtZh/LqXLP62m5U9xO02eS4+1s564iYLwj5CENZxJVRD2DwdV5OmBfmxtBdrGPcvjHrd/RpJBlCTXobD8/tKiAk6Z3hYEYvcEcre2PkcwxxLjtxrlx7gBKZIj7fK5bvzJ4gfC0aa1skmCtXrxg+VwZPpEwYrIuWgmfORsWvuf3iIJ+x4Xx+moFBDQ69wex8nQ+XYDhmCudr/HapfRaDtgfGvnjz5028Z2UmrtFtrIHhuFN/oxvzBZfxSbnJSpIToar9AoP9G5wE23y4v2ag/zQxQMoYgowSL+mPLylSeCakLTVl/Uwz9Bp7eTYkam/+dSn2zu0wm6+HClbsr7EK2BaEhq5e5O0Xna5YtJvGQIhIi+9tOrlhstAA5Ns+d3UEbq/NaJiMcg+Y86vSbRQRJ+0miES+CDsrgRTOOz2/0dLqWO4+h3rxvQECl9KCyLv8x9Aqnd1XoxwmjrJR0E2Zn7we8p7DBAUXcrQnC9y+nWi2oNORZ+rnbtlG+zyr8yfMPdGkBSQTz94b37uU0xt+rMHHORXAvK6uXxdzXyniGnJqjJ5QxQmDS+EA1LC8SkvhmB8i1clgq1sZSF85AvXD3Bjh7FpCrpUwv9KILyVKaCDy+uF7PUu6lhybbLBBK+jFQAxGMaL/HLClrk4B8ojBXfXMLXosp4VgE1RjFzEa6oaxlYrBF4c+Mnn1EGqwwKbLeXoR7cugN6i9ODCLT+4X8l4nkwQv8dT/YpeTBPC3xewQWtMwnHW4srNCdnAr6xnJ2fAsbTs DuPphnuY FL2ZUQW/fzxEjKaGX9GB8Wa1RIJMwsD5N2tdQkVJ4a5if67y9uoFra0EhmDN9Kftx+sGU9iUDTkDokBhTGtgAcg7/YU2+qbH+HR44Gp/czb1WVE6kGZK4GWG8nHR9uFiB0oSG0lLwVn+qPeYuFPMPzI6tJ0Ibj7++wkSOgkAoViZk6jEB8fXWo4PnS1m9jI6IRqywyxYWx8jnlF9kpYkwQN4uhrP/YgQdfabDal6XRlaaLdzTJC4Syp9sAoY1h7eSq/55wxuvY4kQqoSqWYNgYXryeGQDHPk629vzlZCLg5EQyixzSs4xuWad3BOpi5g2jcXQ97jaYAVv6tWskcn6+kj3lZkRPJSxPFiWflh55wfyTeI6DTh2Lj+lZvPrPO4csMbSHwL+hhFLWZchw4mnms93pAQq3RfV29tIOfJLCxNJ4yFHFmlHYYKbno5QbsGabsRTqUyXx1enxf6d7fKf8OGBJ0nmJDSoAlb0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 page. */ -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 /* 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, struct list_head *list, /* lock lru list/PageCompound, ref frozen by page_ref_freeze */ lruvec = folio_lruvec_lock(folio); - ClearPageHasHWPoisoned(head); + folio_clear_has_hwpoisoned(folio); for (i = nr - new_nr; i >= new_nr; i -= new_nr) { struct folio *tail;