From patchwork Thu Jan 12 20:46:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 42815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4104829wrt; Thu, 12 Jan 2023 13:05:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXu8+5Tj36DRyqEwuGY9Mh9YPJ0BTOEGdnzmzJkAwu+zcXRcjT0uVUnbeDItmcyd3FMbaCuB X-Received: by 2002:a17:90a:5994:b0:226:ae12:444d with SMTP id l20-20020a17090a599400b00226ae12444dmr33878004pji.43.1673557532250; Thu, 12 Jan 2023 13:05:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673557532; cv=pass; d=google.com; s=arc-20160816; b=NE9QRDLEHkbIOwgQ5w79qKl7TzDqYL5lwO/2R51vB3Tz75nmfQWKYRWwlkcnT2tVJn qHgv/leYCiPmzExQePvc1Zhj5nSmdnLFgHCRH7G96GHOyqWcUdNCLX0PWFai4PEa7B9c 2sSOzpE/3CGn3i3MAWB+IdrDzhN8w8bAYJlQ36OYPiNthDeWlZFpMX8sDDPK3JCSoA9D Ha5sQPwKrTRFOtCVIhUQz6NpiBCYji5IJ/PdNgCkJM6BS3+ZqdTmefBE6s22E0g9Yqm3 WDvpLwLsnUjIKnB+a15vGZU8H/Ulj5arAD8GfMe72vk6TRcO40ww7yqFzPBVEnH0gEwL xUsg== 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=b/N92ggOTVESy4PAPzARUeux3nxn5O9kMIfCDwqMIIU=; b=o0rPW3IXbr4v7UDMnji9VyyAv/IpDp4GtBVYfDWKSs32r4OSeoojCka8c5KZe6f50t 73Nji8+RmsWfh1xTbibegDydqs39wUa44KxrMncISHKrYrm2odb4ICvDiagN6x0F4EhL KScYPjLhcDUENiOitLuxso8LGdInF7Oj38WtvUeIQbLmE4qUo9WTw6CJo6j9RrSV5X9n o51FEayA2Yx1lgnX7v6rUdAQ0QwPQFkae4vas8xQ2wyuxT5uFFCDWxC+l1XkjUNSBzrO tRJncMlaC2ZErRl+FGBvdH82yLNsNwWIzGse1vNDEv61jzJoJv2nnI9DAf7A0IVVLqss ukdA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=ljq+3vLR; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YtXTDONk; 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 x4-20020a17090a1f8400b00202c8fa5c54si21582631pja.95.2023.01.12.13.05.16; Thu, 12 Jan 2023 13:05:32 -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=ljq+3vLR; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YtXTDONk; 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 S240879AbjALVDj (ORCPT + 99 others); Thu, 12 Jan 2023 16:03:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240634AbjALVCO (ORCPT ); Thu, 12 Jan 2023 16:02:14 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C576F4828D for ; Thu, 12 Jan 2023 12:46:44 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30CJkHMd020386; Thu, 12 Jan 2023 20:46:29 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=b/N92ggOTVESy4PAPzARUeux3nxn5O9kMIfCDwqMIIU=; b=ljq+3vLRXrDEojJzJyeBmYnf1zumD+7fVERIaOzLmbndUeF9raCY2ZpJO7C2YaqBBcIH s1FSMOdQLe3PIInOePtWebSGRPfaRmoVN2GbAfFrbcRlMXqarvkzzzBm0eZyqvk19yJc daia6/T34w+1nx5fJx+x5xMRH+X4qmnmrz10el/GG4hRFyVSrxn0r8N6HAGiU93oVDe5 B6wesc93b5C1A69y3h4XvZsWyumLjgBFK8v4j0tYs3pCscnzqjhRJ88B2ma3iRpN9WnL T1hk94hAbLNrvf20/+qmOXgq+4yiIQHIkv+TiE/WE9zklFWe/jg90Tc7ly3uOc6sj0Zd +w== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n1y1nkhc5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 20:46:28 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30CK1TT4034162; Thu, 12 Jan 2023 20:46:28 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n1k4h0whb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 20:46:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hk5/IN5KXqQmP9di7gZOLoEUtCtPCFgaiac4R9I5dkoEvcPwdGqmIX72W08oS+HEkSGu+YOvY+wJqEXvQGfR5t3iNyMy+so516t4uvFGVOV/wn9BFUkbmcM58yNMtJgXSuKCRa1O/c+svZadOjzRg3njs5olMVkYUos1vEm11KB+zZRZ2cKcAqmyWUuuvzlYaSAcoea/xloH1NbJ60fJe+Sm5ykDjxCofMoBQz29mQvQtCxY1uCA+plYNcA0Q5AiOXtH4Fq+uN0S4uu1QzYMViWltUrDqqLjoR2iwWpPx3crVR2uU35UwGJbBgLQZSOgnMnr/XIDB6DJC+xxBy2jUQ== 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=b/N92ggOTVESy4PAPzARUeux3nxn5O9kMIfCDwqMIIU=; b=lI8pPhXCLUyQbJ6C96MDvbPTk2Uo/sP8uPkBciY3ZxqNMgbdTHj84aalYCkvIa4hfjpyvIyL/pVRIuxp5V7Ocu8wHvgfYxqV/4ZlbccPfz2BW2xLvY6qmEKhTyfIe61Mq+GAO0E++JYPjYAmJKXIFQ8tS0YsY59Nfl/7pXzx8eM/68JEaF8bOV++qTxiHPiqIGI9mLPugZYjF8PsbF9LPoncJ5aOSGzBKxlAZBkR0u6UO7Wbbn6B0iwY+D2jq5AblqRAenA6+dqNDFr0F+MsRVS5uz7LMejVrwA5mRqgbFVgLRahkZaEaQUDTrrZcBcmGZs76I3tpf2HwamXU8OGwg== 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=b/N92ggOTVESy4PAPzARUeux3nxn5O9kMIfCDwqMIIU=; b=YtXTDONkDgcqyOjGSYZHvisAwWCEOjXLC9x56CjBAkrA7J4bfA3VHftfS0FP97ycpsej12b42Aew6DWdY9uoGjr0bwjmENT6cjNJNAeh4k7qWAy6sQWjD62L8mqNqYV7HAxwrig7S5LmqHmeHFDxFVORve4ZVhP7v3Li5r74DU8= 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:26 +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:26 +0000 From: Sidhartha Kumar 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 Subject: [PATCH mm-unstable 4/8] mm/memory-failure: convert free_raw_hwp_pages() to folios Date: Thu, 12 Jan 2023 14:46:04 -0600 Message-Id: <20230112204608.80136-5-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> X-ClientProxiedBy: SJ0PR13CA0097.namprd13.prod.outlook.com (2603:10b6:a03:2c5::12) 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: 0f732dba-eca3-46ae-27e1-08daf4de1246 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qK3wrl6vTo4mDujOGLwyNRxaQRMuA7JFtcMccYrBYCyTY2TFB+hXrf+eNiDZ2DMk4MbnpV2+aMnoSgElLw3geEjojkysXeagiygkmI8/il6ptdGca01r/Pb/VopzKTa8B3drPYOAd+ANw6bXZhdoGn2FSYWHE+dCQW7bKDL4bucCSrt39hY8uh00tgaAvQMeTeFkC6Zq06FdgmTMVl9gZBKmrX+bpql7VkvaCX+Q+mdaOqfIfNXY0FQMYir90IGb3SQtp80CBxIwKrl/nCBeIU6b28+D1U/Vj/YfItRhrKEebYj/+/2fTv8qddTU5ivD52NthoFi/fQTuI5aDFIc5a1+/qyYncXwv4GsNmHdbNGO6ryoAWmBVfvlhTIBcsVlu+FCO0n4mnCzqBVkHeQJWJUgm7w1320Z7/l40eePCtQfnz3jxJHtsa1845kkpzZ1vOaXU1ERK7NJSbGgSB+JKS+4ikGVCqaXFo0743/66rVRvOVgLVXnlYrF0+trQb5oqJOa8WX4JOOVImbZilJRW5I9kCv5FFqkMrnT1ufHazDbUkVRrD7vEhrppwFzpRSpYewGjczqZgRbbAVQDmpJe9ZmITdzQB4ZsYTdC75Aa78eeQCU3a9KJddS+PJbF19NwoaeKJYxASzuM4v3LQ7qoQ== 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9DKwdJ4XvFCc9ZfwwddG/ZJ077A3nrGL+lpnb5xHXE2dkeUBN7rwjYTaiittIsOwV2RFchPELPESiGsAYGyAi21ffjcNww7M0LzmV07UAIPPHlQUhYBydsWaAmb6klBII17qfenM4v0oxU+9uAH9mwryrxQyisCLpOJcHH4MoIdAmeBhLeFVCcfxIFFoTJWvPJPnw6tufqXxKFdEpLhUz8b+7Dfn9lpWEkT89zqtVwqLH27i2LEtgF1JqXtq3lBvvD0nO0rn7u2hBsZ7SAy0Wk/tEGR0Oeri9TR9gw/Vyc9J1WcRJfGErwqBrLoENkQTskX20Fpz+y4iWQKSn9kGLjKKqXzFUn3ZZsoiGh2bJeSjn7RJ/rX5nWz0ONb8zlHazRwQgBL1Z156JJ4ltVNTSd2XgU4q7yNw/dYgRUlQhXYXkATvQrC2H+Vc5oRLv9thYO1dbO7Rxvc7KaiyCfD7/70vIHa7vQcnGvKh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hCgddK4qDvgLLEJ0IXfq2Xr++qXvkI8b/VHypbWGe3H X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f732dba-eca3-46ae-27e1-08daf4de1246 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:25.9100 (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: LUF7txgrpUeYBdpNrQWBzrnp2h3BnL4tKwT1P/fxnIdDyFjz2EYAerLso+VmXG2aH5P95DLndyLloSKcxYAs1tMgeWkZ49CX2dOwkE/zogs= 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 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301120148 X-Proofpoint-GUID: Sarck6fyytDvRWeuTYgSH43y6OwR2b8e X-Proofpoint-ORIG-GUID: Sarck6fyytDvRWeuTYgSH43y6OwR2b8e 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754852263333713864?= X-GMAIL-MSGID: =?utf-8?q?1754852263333713864?= Change free_raw_hwp_pages() to folio_free_raw_hwp(), converts two users of hugetlb specific page macro users to their folio equivalents. Signed-off-by: Sidhartha Kumar --- mm/memory-failure.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 205272c64f37..d5c828328e32 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1766,23 +1766,23 @@ static int hugetlb_set_page_hwpoison(struct page *hpage, struct page *page) return ret; } -static unsigned long free_raw_hwp_pages(struct page *hpage, bool move_flag) +static unsigned long folio_free_raw_hwp(struct folio *folio, bool move_flag) { /* - * HPageVmemmapOptimized hugepages can't be freed because struct + * hugetlb_vmemmap_optimized hugepages can't be freed because struct * pages for tail pages are required but they don't exist. */ - if (move_flag && HPageVmemmapOptimized(hpage)) + if (move_flag && folio_test_hugetlb_vmemmap_optimized(folio)) return 0; /* - * HPageRawHwpUnreliable hugepages shouldn't be unpoisoned by + * hugetlb_raw_hwp_unreliable hugepages shouldn't be unpoisoned by * definition. */ - if (HPageRawHwpUnreliable(hpage)) + if (folio_test_hugetlb_raw_hwp_unreliable(folio)) return 0; - return __free_raw_hwp_pages(hpage, move_flag); + return __free_raw_hwp_pages(&folio->page, move_flag); } void folio_clear_hugetlb_hwpoison(struct folio *folio) @@ -1790,7 +1790,7 @@ void folio_clear_hugetlb_hwpoison(struct folio *folio) if (folio_test_hugetlb_raw_hwp_unreliable(folio)) return; folio_clear_hwpoison(folio); - free_raw_hwp_pages(&folio->page, true); + folio_free_raw_hwp(folio, true); } /* @@ -1929,7 +1929,7 @@ static inline int try_memory_failure_hugetlb(unsigned long pfn, int flags, int * return 0; } -static inline unsigned long free_raw_hwp_pages(struct page *hpage, bool flag) +static inline unsigned long folio_free_raw_hwp(struct folio *folio, bool flag) { return 0; } @@ -2336,6 +2336,7 @@ core_initcall(memory_failure_init); int unpoison_memory(unsigned long pfn) { struct page *page; + struct folio *folio; struct page *p; int ret = -EBUSY; unsigned long count = 1; @@ -2348,6 +2349,7 @@ int unpoison_memory(unsigned long pfn) p = pfn_to_page(pfn); page = compound_head(p); + folio = page_folio(p); mutex_lock(&mf_mutex); @@ -2389,7 +2391,7 @@ int unpoison_memory(unsigned long pfn) if (!ret) { if (PageHuge(p)) { huge = true; - count = free_raw_hwp_pages(page, false); + count = folio_free_raw_hwp(folio, false); if (count == 0) { ret = -EBUSY; goto unlock_mutex; @@ -2405,7 +2407,7 @@ int unpoison_memory(unsigned long pfn) } else { if (PageHuge(p)) { huge = true; - count = free_raw_hwp_pages(page, false); + count = folio_free_raw_hwp(folio, false); if (count == 0) { ret = -EBUSY; put_page(page);