[mm-unstable,1/8] mm/memory-failure: convert __get_huge_page_for_hwpoison() to folios
Message ID | 20230112204608.80136-2-sidhartha.kumar@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4105287wrt; Thu, 12 Jan 2023 13:06:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXsS38iuR8zT/v6q10+gvwgbWaB+OEZdh9Flcb4Lvx0YTQQe/wDV2FPRBXkc9mC3k6BrI8uI X-Received: by 2002:a05:6a21:c008:b0:af:8448:5137 with SMTP id bm8-20020a056a21c00800b000af84485137mr97051453pzc.39.1673557591619; Thu, 12 Jan 2023 13:06:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673557591; cv=pass; d=google.com; s=arc-20160816; b=qg/Zw5LOeGNIuLORMe3hpPvIgLheR1ix+MmznAKfcmaQTadnqvJtxa+XFoGD7mZIb1 VYb7TUySUgPdyPWUqGQ9PcR/Xnuje7Rsv9AMCEjseeYUGm9cke2T98nJX6ui4mmNjNkU PSx9V+dRdZKUxEZAcK/QCfUK9JVGApKzAokxtzRBbCzpYKw9XmOjBqQTjpm3ELv4L2bY lOClcjHn3wAVxBJaONlp+RXxSA/G2J1tqqwxXSoDbZ15UyK4mQ96FpFo8fGKH0zgvvIg OCWyBpADr2E7qdUgK6+jHksUEGIaExVVBOqLzTiaIqmGcBJCweWOoBqmu4spLDixbHFa QAWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=5ZhXU0K0obhHWYBra0myTmvhNZYLEHNRBdlUL+JmMXM=; b=YL77M3NaoLF6A2zFIZalGabdTuQ48SjVn6MwgIFZ8jaZy3Lt+0NPS8f9wADPhKwdRx DrH7lvUNpL89QEI7eJjRkvSp/mi4oGZdmMDXxMROwDRJFnhnf3723shuPDen4q/87JB1 n6mPC0NpGdiypDPnApnt9xpJ9x/hyfnWCk7no23e2Knjsi9koYDHKvlPHhDUueDp8Non Dg2gzwuN7Fv/q97MP3T8AjgRmHwz7D/iOJreciVdEZ32BZwQzLXiGvFx0kmyLYM2ky0o bjPCR1E74+Ukq5cuvii5zVgRZy59POgOtzXBRr6dF3ppKqMqpYwbhQcAGbutpZZ5do3m DahA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=i6I00Ckq; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HDVzf3WN; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h192-20020a636cc9000000b004784654214fsi17929719pgc.442.2023.01.12.13.06.13; Thu, 12 Jan 2023 13:06:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=i6I00Ckq; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HDVzf3WN; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240839AbjALVDM (ORCPT <rfc822;zhuangel570@gmail.com> + 99 others); Thu, 12 Jan 2023 16:03:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240629AbjALVCM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Jan 2023 16:02:12 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6A245654 for <linux-kernel@vger.kernel.org>; Thu, 12 Jan 2023 12:46:39 -0800 (PST) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30CJXrdB031605; Thu, 12 Jan 2023 20:46:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=5ZhXU0K0obhHWYBra0myTmvhNZYLEHNRBdlUL+JmMXM=; b=i6I00Ckq8ZfzjacFEutouPA/2JpJJhMqzZgmaCLWi8oqyH2Y2qlWQ+PWIOR9RV8Pgfi/ ++b7G/7kd3bZ9AcGRlaW+9lPmjNpLBa72/W4VOwaMH45wVJCbLsz5z8uilPJma946n/g AUbZDQCzS6iycUNINtq25ZrNh8mEIWuvvQ1msSMY/10LTDfkGYr/3SnPr2vOmsSvsmYl 47s9HWaxsKGN7bA2rtcGQsn761FoQmmSiHX955UgnzctPkWQd0wynhMxnBDNo87p7XXN pdwcr8exSizMOAhlU35n3iae2le/gvQf0JUGoqCoWULcQLPhzmgeuuzZBtEL+BOE6/Dp Jg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3my0sckagc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 20:46:18 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30CJPD3j016114; Thu, 12 Jan 2023 20:46:18 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3n1k4ra2u2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 20:46:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fl+C0nC1xy9RiPk9zX+8eYuF2Yh3zZ1/AbPWPIIwmdWtmXsHi3FGv8HhU0ms5bf/8uEs/vtxM7n+6SEQXZ+vEVLXPTYlxNnUiuE1E0LlGIvo8IcaM9qxtdD5S+zIqpQjTEZWJ/WhIXf09outscZauj2iHLsdIxFlbOnEYOpt+oZc5djJ1YeAAaR0hSL+eKVy3ZvmYDMqikEVv/7fbl0biQW/Uha7npnzg+A8kOXzuSGZ8E17TsjdowZXS37LN2PbV7LOumEdxeXlYTC5s+A+mSn9Xtrt8nsAtkR5/V71d8JWLkWgQ4uJMqRs2/9bIxBEVr4ACqZrvvkFVWnqL6aQMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5ZhXU0K0obhHWYBra0myTmvhNZYLEHNRBdlUL+JmMXM=; b=bSPgkKJxX5liciQCVs3xvSCJmMgV1A7v9VRuY6Tv9y2bQSGjQ0mRv8qmRkn6Pie50urkALZAEfcXzeiegkg0YqEz11RAb2gEJ0Vr/8ZDPAGteC3leRw28G3sAd581+zO+V8C66gAIZzVyxK9hmv0THm7RPDWVDIqvq55hpbpTMKnb2Cafz7jv0NvPJQSxDJZE3nyRmEqXc3yUFI8hl3Z1VV3OLq9vNPlXTtKbyqRxJCUc5oEFD8uriylz5ecnScGExxR0H4gylf1HLmwAamgj7w50rN1/2+MH4OYr+Ra+/WzPSy/KLWAbOP2eosBAgqEvYBufqgLhk9pf97F6TFSjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5ZhXU0K0obhHWYBra0myTmvhNZYLEHNRBdlUL+JmMXM=; b=HDVzf3WNCheg83ULGX8x9+2g1twIw4c8/VzORFhQyV9f2zxVSo0W1yBI+YhLlwxKxYaK3/SsSjv97U/l5hIi4xFymMG9c4zZ194XwvZLJ8TIRRKW05jUyFdRSbuG8dn6CORNPhup/8nUKJj5+KAwBOJR+StzUomcdEMaU4Oprv4= Received: from DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) by CY8PR10MB6804.namprd10.prod.outlook.com (2603:10b6:930:9b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.11; Thu, 12 Jan 2023 20:46:16 +0000 Received: from DS7PR10MB5117.namprd10.prod.outlook.com ([fe80::93ca:e22f:aa6d:94d9]) by DS7PR10MB5117.namprd10.prod.outlook.com ([fe80::93ca:e22f:aa6d:94d9%2]) with mapi id 15.20.6002.011; Thu, 12 Jan 2023 20:46:16 +0000 From: Sidhartha Kumar <sidhartha.kumar@oracle.com> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, linmiaohe@huawei.com, naoya.horiguchi@nec.com, willy@infradead.org, Sidhartha Kumar <sidhartha.kumar@oracle.com> Subject: [PATCH mm-unstable 1/8] mm/memory-failure: convert __get_huge_page_for_hwpoison() to folios Date: Thu, 12 Jan 2023 14:46:01 -0600 Message-Id: <20230112204608.80136-2-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112204608.80136-1-sidhartha.kumar@oracle.com> References: <20230112204608.80136-1-sidhartha.kumar@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0P220CA0017.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::27) To DS7PR10MB5117.namprd10.prod.outlook.com (2603:10b6:5:3a6::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR10MB5117:EE_|CY8PR10MB6804:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fa91f0d-7195-46de-53b7-08daf4de0c97 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bl10q9Kh8LdqVHnL6rBVtH1DLNY+KyEl+GkkkIMWx214WZLKvUIh/HqHTI9nrmBTHpKYH8MAq1eiHyXNS+Kh1UKmGuIRiH/bib/xy+3ko/R7r2v3QPeB2Y85zf9YJ0LlIOz9t2CfG5LW12pbdrAoqsZuJQ8nrsk5rxkFtXlrPdtXAF7XTyjmNJTWX6SLMfy2vluB3i3gbt+c+euC9ogLIIvduFlIQnmz0tbbv7Vo6PwuiLrnfRpNpKojfGWrXH7LBNWhtGm0ViIvizksaAxEeupmds3XeNLthdWjiNjBct/eV6Ukl0okgg6ecbKXQBW8DnP9C8k82m2wpMlJIidQkmTqtI90VW0PtFaCGfYIFOmX+DvBbFKyhqdodEAgpelox1bRbDrNyrPXxoAkKbsDFnklvLZ3HNx0PSGUKrjywL0ZZDGMvMh4kjnKhKd5JQ8UUdeDvFtaX/7Q4WmW3puGsuhYxznuzu7utv9enjKhN6KbG3vOArMnZUzvAsaO5Nd8VFyaxiQIZWlRWwSSvpxkeQx88wzb3eytcjv1y/A8pI19THSigiEG5ihYXu0NPfhGw1G8h/XfbtB+c/ePDJWoKjfelanq4MQ2t+phKBZrYQYCj8CFW1OKKRX2MMGC55Bz65qIvd47urZPPYki0pflk1hLXgQaQk6coLNyOHEz7McwmBGPcJk9GmEnwpiWbzV0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5117.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(346002)(136003)(366004)(376002)(396003)(451199015)(44832011)(186003)(2616005)(6512007)(478600001)(316002)(5660300002)(107886003)(6486002)(1076003)(66946007)(8676002)(66476007)(66556008)(4326008)(83380400001)(8936002)(86362001)(41300700001)(36756003)(38100700002)(6666004)(6506007)(2906002)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5b50hv3DxMIRBWxPjkS3JvgIpHg5eLjCJRNW2vJLfq6SPJRGnGYj+Mb8MTDuyRiz5UdjIYbn/s0uwMcaIVcQPwKc9xRyA5tfMGakv7MQ2QuoZ2EoWS80G3MB8a2n+QXzmYbVI8wqaAyxxOsnBn7tV95gVwjloc64dHAnaNfCfI4vewv1FYOrykTa1MJ1ltWdYLFwr1nVTD9uIWezAdYoYy3llZQBIuD0+O5JXTzW7kTYtY7vkkIHR3b9mor6GrwzLmw4OXe0jlEiZkFSQTknI1LU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sWZWW5zNF/4dEKmJYb7XAuHmCDu97sjjCcQrfISKtkzt+abNmdMPQ5nlzR5b5S9XyF85nrUXvNW/E/8UlAho2Pi4+3dXGL8yPSA5CnERa15aAwYUCe4rHYsbCvjYYhfzONLqjlOvS0BfuN6eNuYubZa45j4VkWw4j52UinPFx2+twewMnlrHihkuuSy2N8n/0lB4Wv2GCkc/WaHKb5FX8HtqNvjWfQX/DOnmIIOrXMdvoRe5aWtetyBVxqJ7/hBqHb13N+ X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fa91f0d-7195-46de-53b7-08daf4de0c97 X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5117.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 20:46:16.0163 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9VIg8pzaEerT2Hp3nZ5zPwGiyFb5zUer03l54ysKg9ZEwcw13/kjHOm4jKFw9PPBayf3i1SjM4EG/AhfC3qe9w+um6dsxsFW7bLv03ySdvI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6804 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_12,2023-01-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301120148 X-Proofpoint-GUID: k5s4JmT990fZcuDW8dfB8ipmGYdokatp X-Proofpoint-ORIG-GUID: k5s4JmT990fZcuDW8dfB8ipmGYdokatp X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754852325394382425?= X-GMAIL-MSGID: =?utf-8?q?1754852325394382425?= |
Series |
convert hugepage memory failure functions to folios
|
|
Commit Message
Sidhartha Kumar
Jan. 12, 2023, 8:46 p.m. UTC
Use a folio throughout the function rather than using a head page. This
also reduces the users of the page version of hugetlb specific page flags.
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
---
mm/memory-failure.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9a80d7830b40..ee7e79ec6eaf 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1807,20 +1807,20 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags, bool *migratable_cleared) { struct page *page = pfn_to_page(pfn); - struct page *head = compound_head(page); + struct folio *folio = page_folio(page); int ret = 2; /* fallback to normal page handling */ bool count_increased = false; - if (!PageHeadHuge(head)) + if (!folio_test_hugetlb(folio)) goto out; if (flags & MF_COUNT_INCREASED) { ret = 1; count_increased = true; - } else if (HPageFreed(head)) { + } else if (folio_test_hugetlb_freed(folio)) { ret = 0; - } else if (HPageMigratable(head)) { - ret = get_page_unless_zero(head); + } else if (folio_test_hugetlb_migratable(folio)) { + ret = folio_try_get(folio); if (ret) count_increased = true; } else { @@ -1829,24 +1829,24 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags, goto out; } - if (hugetlb_set_page_hwpoison(head, page)) { + if (hugetlb_set_page_hwpoison(&folio->page, page)) { ret = -EHWPOISON; goto out; } /* - * Clearing HPageMigratable for hwpoisoned hugepages to prevent them + * Clearing hugetlb_migratable for hwpoisoned hugepages to prevent them * from being migrated by memory hotremove. */ - if (count_increased && HPageMigratable(head)) { - ClearHPageMigratable(head); + if (count_increased && folio_test_hugetlb_migratable(folio)) { + folio_clear_hugetlb_migratable(folio); *migratable_cleared = true; } return ret; out: if (count_increased) - put_page(head); + folio_put(folio); return ret; }