From patchwork Mon Jan 23 20:23:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13112890 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 606AEC05027 for ; Mon, 23 Jan 2023 20:25:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE69A6B0071; Mon, 23 Jan 2023 15:25:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A6E4B6B0072; Mon, 23 Jan 2023 15:25:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89B496B0075; Mon, 23 Jan 2023 15:25:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 755476B0071 for ; Mon, 23 Jan 2023 15:25:00 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 402C342B0D for ; Mon, 23 Jan 2023 20:25:00 +0000 (UTC) X-FDA: 80387192760.04.D7C9519 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 031F3C001B for ; Mon, 23 Jan 2023 20:24:55 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b="YY1P+/lu"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hspzSNv2; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf22.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674505496; 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: references:dkim-signature; bh=JfFX0b2CIlyocqogZlxkBT4HhqRHSXFipYtB+o3pynY=; b=EoxmRIBWSUxd96PO1yBP/7mI3fO9cH3V7o5QwMdZDY9KMbdyBfa80R087TnTD1yg/XWawj 5UaMWJu23+mQojIDAbYGAT4szVzzDI4lyIz/5MfJJln27XN3+kF4EGbWrYJYC6itpDN9BW a7glQc8Jaqsi9pn3hCwApO+qehpxsQA= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b="YY1P+/lu"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hspzSNv2; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf22.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1674505496; a=rsa-sha256; cv=pass; b=VpEx7f8Te3n34FYfPh+KQB1Jh9Wv9tqYShE7hTMvL1qe5YxBy7cZNhiWvaw6VafKoUq622 OaWKo5HOPLcRMuqI4ksd7eAEB+MRiV7+WpbKjKPHnJQbJ6mvZlWYZef6PIPhf2P1RrDvIX Xeh2jRZ+Rn4EYiC6hondp00ffb5gE4g= 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 30NKDmbQ022179; Mon, 23 Jan 2023 20:24:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=JfFX0b2CIlyocqogZlxkBT4HhqRHSXFipYtB+o3pynY=; b=YY1P+/luo4+SsLljrQ4hlJtKuMPPSNxnR1LJlt1NqZk1w3HOYu1HZlS9KVAAKFJz4jrD MqbkBp+EzKLcoCCRmHzHV4d5yveuVIrlrnQGSlTpogoKXIEynkJLEo6qmW/QzZeXkkba in3MIrTDnZTMP+rp6xXBijqzRTxUZakq8iU/QZs0EUsfxT/kh2Eyg6F45Z4MnHOt7cUl wlpj9LGQGfLVcSeqWDD6OcERZN23OcG/z+WznCbUefbaACYinMcGzBCjbYEOfc6ROr4s Xz1VgSZWuBIKpoed3WGZSlvFSeFUqBd3pAuWcgZSUoNdpSZppRbD3c4miBh67JDpygnt Eg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n86u2utqr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 20:24:45 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30NIhMLi040190; Mon, 23 Jan 2023 20:24:44 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2176.outbound.protection.outlook.com [104.47.59.176]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n86g41fcs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 20:24:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FamlMBvYphuLe3JFnQJvSEYokYqyd/bUkHWEfcFCM7kJfQfo1iZ0/ZlUW3ZsTZcblQnxDlHcznehO2JPSn1KbThBOGcFLO1v7+4m8EwRDukPQ24/i9YEYdB/eiN6kADn8kzEWnwZph2pb9YT9NCp7z9FT5ZYNkxW2HzoiwCDh9wRE/OT/0WFW4gE/zrqUYfDJDab1cLzFFJGeEpJ0VcP0LgVd1rONFMTsggxNH54VA8vBTXbMP3rMI0NrIIBJkpyHGAEFAa8Iwe9PbA9Huf53EuPzaMXLYCoEyRwcFEDRCIOE6XdxQ9qS9ZKjR5gedug+HD4xP3nv4DLSe48py/69g== 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=JfFX0b2CIlyocqogZlxkBT4HhqRHSXFipYtB+o3pynY=; b=XorSyspAm9tWYV9TQc7F996dnXz1JL5xasRY25BH1rkUQ/q9pglWrPFi9dQVtUK3T/cKgh4X56nS0/5Vq2cz/NPLGF3eZ/PS+FDrRIbnJrvd41TFkwGxKL9fFY+jAjYKq/SEup/9D/IOyVT9SRNPbo/9fyy/kl9sbtAJt4W476vZDaiMDnOMVOkG7iDhJ0wScg//8NAIdsQyOtu9tqqz7SOz7v/sbFmGFT/oKMc94H1v6QDG1f1Sdhn8StsbKNfRv2DyPWlgIcOhX4hp+rt/CkRlWBkj4oV/JgANi6O6UTV9x4PE6ox0GE4UOPJKM/n8eXgXSWluvNT4Uzpl8xpu3g== 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=JfFX0b2CIlyocqogZlxkBT4HhqRHSXFipYtB+o3pynY=; b=hspzSNv2y8NMUTTw69RRMQH+3qFyeLXrb6cFbGvAuGsNFNZgeXWQiFb8WCFZ3BiCuDwxSU4y8Zex7KHaGOqImzKr0iD0pZvCt04byTyHA4wb1PGjsjP7oJlUZYOTrB0usd5lY4koOD8EkTdguX/C2tcw2G2J98eCOBlYPF5VLt4= Received: from BLAPR10MB5106.namprd10.prod.outlook.com (2603:10b6:208:30c::14) by DM4PR10MB6013.namprd10.prod.outlook.com (2603:10b6:8:ae::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.16; Mon, 23 Jan 2023 20:24:43 +0000 Received: from BLAPR10MB5106.namprd10.prod.outlook.com ([fe80::682f:125b:f637:f89f]) by BLAPR10MB5106.namprd10.prod.outlook.com ([fe80::682f:125b:f637:f89f%4]) with mapi id 15.20.6043.005; Mon, 23 Jan 2023 20:24:43 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, david@redhat.com, osalvador@suse.de, Sidhartha Kumar Subject: [PATCH 1/2] mm/memory_hotplug: remove head page reference in do_migrate_range Date: Mon, 23 Jan 2023 12:23:46 -0800 Message-Id: <20230123202347.317065-1-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.39.1 X-ClientProxiedBy: BY5PR03CA0020.namprd03.prod.outlook.com (2603:10b6:a03:1e0::30) To BLAPR10MB5106.namprd10.prod.outlook.com (2603:10b6:208:30c::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB5106:EE_|DM4PR10MB6013:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e9de00e-bac8-45f4-e112-08dafd7fdc6f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fJkvCticmoHWQ08s36GoSqm7oVXD5RUpWZQO5k3AZOOxK8OS5Qm+dA03oqSC4tYoLFr6P+OVsf5E9ncb8rUFu0Gx1AxZJf78dSGZewB4nJvDT9+x5Asl/XqmrXurh5TCwlObwzYS/ThshWocg14rLhXrV4yi3SN/23m/PvjYBOQ9nz9yoQAnYGDvbGItvkBDIV0FArg5R3qGqSc/88gpCpnWpI+NRaq25C/HqbWtRTfxUw0JDmzk/ON3rVwUk/KXAFfGccq2jRtWM1+5QyYs+feAJTwaO2KBZRoBkVHtxQSFWdjhPsFFE+KMeyWFD0wEjgtQSYRilD4guZZMEsYW23yVJ9SuAznX46HhYgtyxu509gS/9m4t1s7O3SZDZteEIcM27bF9YdZ0aefIVmwtErWQuKLGPspmwkuvqx0v7Y+Ck79N3xKdLC6Xqb/FO6nB6fKejmw51ue1jUsSyGg1r6RHr+WyFiLl0jICr3UzfkXf6Ail0spPD66cFcVEDVinRNH/wmcGVX9uxkY01wNeLEuB4+WIoDDsDaTiZ44zvKwP5U2YvD+DzV46pK1Le5yEyyE2+OYEkopdg2q6odP7/QnkD/PgAuMtcYDKyFt9qducYxHHz3EzmtnCwuwm+qH30Ql2pdjYrmqIErhnTWFBBQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5106.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(376002)(346002)(136003)(39860400002)(366004)(451199015)(36756003)(316002)(66476007)(86362001)(66946007)(66556008)(4326008)(8676002)(26005)(186003)(6512007)(107886003)(83380400001)(6506007)(478600001)(6486002)(2906002)(2616005)(1076003)(5660300002)(44832011)(8936002)(41300700001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount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0eaANnWS9xmvyvcA1BMwi4jTuldbrtnXLIG62gNr0auvpjP1+3w4quHmjUSiUJ9w/5H2VCl2piErO2FoOdoEesD8gFR0srs59bNxR5JepYq7xLlrM4z2OC1ceNe/IsZvi4gej6G0VVz6qGHZ+MdEQJs3mmRbgF/ROhpNeOtUyCVrrSdhXiHjqLCG9nAAaePR5k1d76bj3t1XrLw22gEsjPRAgByJMnAoR0K7QLlJQs76j8wVaEk6TD6ncdLP+iQmOJ8j8dhUUHxxm83E9LrVJmcbftFoUtOhkjlGxIwd1GuZNAZiMdY99WNipXGHxbZisk4p6M19Ox1bfKGoIX5bwzyeHPmLAwPFOjeZLYO6apq1qvTKCY1EEmlBq5S01XZ5QANGMd/hqqKIFVmIExVkpsNUgxnOl5Nt603u3aBLwL3yuNnK3HZqxG/caTgxD4OOnv/YxSSg+MvD8Zd2Jw2tLiVfmeaajZY7lwKSwe4YLAQPVdeghCbkrrd0NvM40KOoj7+TdRZXczShK5LATDHSHRM X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e9de00e-bac8-45f4-e112-08dafd7fdc6f X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5106.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2023 20:24:42.9683 (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: rV9rdyA2Mb2nuAK1zx5849jZnBK/Aw0NPk+y6xxGm4ZBe8TRFFQKt7igNLOIxvzE/5EYsqt9QK6R/QtQWpyQZY7BOzQUwOuAsp3tRn+q1UY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6013 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-23_12,2023-01-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301230195 X-Proofpoint-GUID: ZtoY5MbMW4W_QoSf9eh0B_g7F_Do_80K X-Proofpoint-ORIG-GUID: ZtoY5MbMW4W_QoSf9eh0B_g7F_Do_80K X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 031F3C001B X-Stat-Signature: fchkdn6kgxronxxhb1wt8ikwwa5e5u5f X-HE-Tag: 1674505495-477148 X-HE-Meta: U2FsdGVkX185bzPYGxQiG5Sr1dFOJunVNkUcHZBcAogM5ZzsiYA6K4LMpXKG0cQQlvEfCMzAn9cwVA9+A6e3tOYiTLD3VDqxVgk9R9s92U9t7Y+hkKbq2aejwNk1nMPUnM2JzRW8OfTeiNsT2qXRegnGLAqmvRVYHsbPwucv9DbmfKp4VbqZfSM4YjzZT83UdhIzioeD0FPb+EUxD/MW0wH58gWj6xE2WwCNAHmvUvDzE+1AyU9wrXbVluOYHLo7GMU6fnNr/qO3NwnCiSLqvUSZV0cBYXDzpC4/2oUzUjsp/4YhzXwZqBlXybGNHHXfpWCwMl6DIKEuPrW28bYt2pyRcruYcgPmcgAgv6VGsZjGNeJwJrJr04hCUnlBSDDxS8yavxcQUjGmnvyARNtyLA3lc1F9ljmhDpJ7NehZJ/LDgsYHhxSQhED3ZztCamiSIT/MCnmFc0ybENgFiTCG313u5LwGW+h9G43vPb0I0PWrvrgMbq13kCOBI+8iy/kf8YQHYS1ly8QIUYIcoF3Z021dqb0FtPx9sDMfZATxORru9vR0NK7zGSTt6AXCtgKxiy0cOMYCA0dbBgpPZzrvbA2b8bpo4jV4F7N4OXZ1UiD3GENuY7zOOjcmbCwCWp+21BERkeqV38Nnu8BaYvUAriQUa2M9klfQRvT2w7le7zYaar2g8+ibRac3lC5UXoVDbG2Un25zAAgqoBIMWIo9X9GhKxK5UlWpzztW6Wj0QzuY44INmXHUPzOzJtXUc0KpffUqupRmAIq04qgHCtGKIkasRQSswwv0uMEsJ1J1EZYsCfsL5qu2Fh071l1zRG0EB45U+Nt1wrpI6i7sfzexeYquVfBqKD+OL5DQsginwcb25JvgQtCK6aaWQL50inz31f0BDcmWOa/wncObVaSBSL950Hl1yeUj5p2B0qYSUiG+2/eG3mEG9nMhLL8nZLBKxAfHSSRCp7yhq63YrOe MYyxHu0l TrNqCDlxbriGW8Q+himwEq6TlgDlm2TAxtXihpUFdVjB/DJWOCfO4qdPSz4pX1iQYj/8AGDDmjUJUO4CEslrwBmoEqfWWNBjv3+HPoQQfag+e2ru2YZjPEBbJMdqZuKHd/r65llCOrWQDmWIoBJlyW6+7mtLz9m+2oG3G6XopqG7mcLVx+TliCdmz5iTFIXIUL7W+eNuYzh7z8FSQFNq2M2tRwlTSn31DBbr0ls8nHTYoCfv2TxIfzlyGyHth+Fnc7yHr9H8Sw2j6qPllgwdaIybt/JcmWbPoXQYnBJXGRHBrxVHUxvdmYh3U0fsjwtyGQ0C3qgrgPf6GV+KFHVCN+lvsAETGGCoK1o+USztntAEMUjYf94bTbnNAlK+DZEgCts1ygF1kWaOBuJRoT5o9gI29VDxI8+JqYUqXbnd6bDVPpJYOrPQiVmY4vRTEUPskH3la X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The head page variable is not needed as we can use folio equivalent functions. Signed-off-by: Sidhartha Kumar --- mm/memory_hotplug.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index a1e8c3e9ab08..ad09189786b1 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1624,7 +1624,7 @@ static int do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) { unsigned long pfn; - struct page *page, *head; + struct page *page; int ret = 0; LIST_HEAD(source); static DEFINE_RATELIMIT_STATE(migrate_rs, DEFAULT_RATELIMIT_INTERVAL, @@ -1637,14 +1637,13 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) continue; page = pfn_to_page(pfn); folio = page_folio(page); - head = &folio->page; - if (PageHuge(page)) { - pfn = page_to_pfn(head) + compound_nr(head) - 1; + if (folio_test_hugetlb(folio)) { + pfn = folio_pfn(folio) + folio_nr_pages(folio) - 1; isolate_hugetlb(folio, &source); continue; - } else if (PageTransHuge(page)) - pfn = page_to_pfn(head) + thp_nr_pages(page) - 1; + } else if (folio_test_transhuge(folio)) + pfn = folio_pfn(folio) + thp_nr_pages(page) - 1; /* * HWPoison pages have elevated reference counts so the migration would From patchwork Mon Jan 23 20:23:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13112891 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 42160C38142 for ; Mon, 23 Jan 2023 20:25:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D56BF6B0072; Mon, 23 Jan 2023 15:25:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CB8B26B0078; Mon, 23 Jan 2023 15:25:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 936166B0074; Mon, 23 Jan 2023 15:25:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7CD9B6B0072 for ; Mon, 23 Jan 2023 15:25:00 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 3D7BF426C9 for ; Mon, 23 Jan 2023 20:25:00 +0000 (UTC) X-FDA: 80387192760.29.CF0FAF1 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf25.hostedemail.com (Postfix) with ESMTP id D2AF0A001A for ; Mon, 23 Jan 2023 20:24:56 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=tcN3Syks; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tR3fm3OZ; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf25.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674505496; 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=ldapDEpPRHIJo5jVjg1txg/5YKHge8AqOQ1FyTlMWVM=; b=XF3SsKkQmh7NQ8ypMiO5QU6AZlUfYgXsxlz8+uVM17+OugiTQuAg61ADmjZB6cWWuBBXDY Iu3ik0VHlNixn8wnUf15FkD0Iv/IeyYZ22cA9HQqN3iXKJyUTAyXYP0ZHNZvMYP/3Xo4/Q nt/13Oxkw/6SvV8BQ/0litP6uXijwCI= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=tcN3Syks; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tR3fm3OZ; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf25.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1674505496; a=rsa-sha256; cv=pass; b=zsRus4x5+RqP3nRsP4SBF0x9TTRlTbrcY6HNlyPiDhHmvqXQEqiLbUz8EXy5rPnZaROlKt Y+I5NjSgoNEHYQKfZembD5c8ey623JZ0iqPeo0qw4OHhiSuSx/iGui1q4ETWvv7zTysjg+ qCiCXTU7dvlbkhA9cxAi0FS0+lJ4FM4= 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 30NKDkWr009712; Mon, 23 Jan 2023 20:24:48 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=ldapDEpPRHIJo5jVjg1txg/5YKHge8AqOQ1FyTlMWVM=; b=tcN3Syks3oOuzuNSrJZA/qOqXEAtdj+5TCjQ8vJ8T8MsSDzHX5gfav1rhaRoTH4pGsZb hGr6Mozj+Wj7WGukuRNUO1VelSBlyfea+tVffqCZAC3MrXZdFekiPOYxlTcSR/BFllcm 7g1tRZWKCu09540Q+ufIOI8V8xApes3OAjvj31KK/4PkNaqtrhBl6KBC4di+Gyg27ywT SI2Rn31FBKKHbnuP4q6juHzePYmBfNUYcULBIGMPCaRdRZ42uSFfWTHQ+wLKVWScoeii qvE9gPssE1czuEECA6V9cZJTWg9K08C6zOhBIYs9kRoKAEQzAtigay6R1RKub6WLYHH6 dg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n883c3t3n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 20:24:48 +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 30NJLP8G039602; Mon, 23 Jan 2023 20:24:47 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3n86gatwx1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 20:24:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bG8Fp+r3NIDgniswaCNasYX0kljGN9q7hlqjWv5JVpHeFBx7y8ipmyqNG23paHd1KP+wNfVz2oJQ0flIYX79mjowq0W6oPQdoTituukMg/huEsUNYtcQwQHGt18nO/myCTV1cygjxnsnxsvNX2r1qketU4aC0n8x3JdQJwV6cuBF4Mxdsk5ubvO4D8mlNB2XxDhiXl2+soR5Ce3HENChC7qCIyv+a3LRBAtsd8uE/Q3YkCxFVkMcxHsCXJiy5pRicoasKWE+CBVirK/XjEa8uPiih7hTZBLdOo1pJh7kCs+OJEJvopiRly6TFDWpYQ0YPn3O1TKDSZ/3aQeR86GkEg== 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=ldapDEpPRHIJo5jVjg1txg/5YKHge8AqOQ1FyTlMWVM=; b=Icp1F/DeR2iswuXoBl0W6coJdUwThstWqZCd77PDsY3a61wJbJzvzsPry7ymuWLaXigJgFPnb756GQzAKcxMOQf+4doyWm5Fc2oWfYUuxZGVgvopaw1jHdKov9N06sgV+b4uRdcpmrqumNpcxHN0Snk8/UR1iHek9q1JHKjaBwtEwCG6wwQZmOwINHfC7RDNvo7DSLsUcuTi4dwqmK/ecjKkEpiPoBwOJf/tLZt9dA1V594UI+/HO6r1TiUj8E6jm+SvfCxf1Zq9AK59FhfLJmkaxeh5aFL6JlJtDzSKlwFjE1Q87ZatsA/8AQf/C4rsyUJpM6w33VTm19foe2oqLQ== 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=ldapDEpPRHIJo5jVjg1txg/5YKHge8AqOQ1FyTlMWVM=; b=tR3fm3OZ7Nb5MSQdHPlLPBtB0Ci6vAA1rvMFggVzBORl0+0WxKXaYs/GSq89xxzsT5wnPOcayXc7+82dsuSjgpalyrxlRZ4wfzsYWphyS9fmtN3IGdnPV8BusQ3cN5ZVwvNRC81XVRpSK+3hKKTB+ePTArp8gBaWJu62/nNTZ+o= Received: from BLAPR10MB5106.namprd10.prod.outlook.com (2603:10b6:208:30c::14) by DM4PR10MB6013.namprd10.prod.outlook.com (2603:10b6:8:ae::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.16; Mon, 23 Jan 2023 20:24:46 +0000 Received: from BLAPR10MB5106.namprd10.prod.outlook.com ([fe80::682f:125b:f637:f89f]) by BLAPR10MB5106.namprd10.prod.outlook.com ([fe80::682f:125b:f637:f89f%4]) with mapi id 15.20.6043.005; Mon, 23 Jan 2023 20:24:46 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, david@redhat.com, osalvador@suse.de, Sidhartha Kumar Subject: [PATCH 2/2] mm/memory_hotplug: remove head page reference in scan_movable_pages() Date: Mon, 23 Jan 2023 12:23:47 -0800 Message-Id: <20230123202347.317065-2-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230123202347.317065-1-sidhartha.kumar@oracle.com> References: <20230123202347.317065-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: SJ0PR05CA0105.namprd05.prod.outlook.com (2603:10b6:a03:334::20) To BLAPR10MB5106.namprd10.prod.outlook.com (2603:10b6:208:30c::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB5106:EE_|DM4PR10MB6013:EE_ X-MS-Office365-Filtering-Correlation-Id: b3d4d287-e4a3-4d6a-80ab-08dafd7fde4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ekP/Uq6yCiybEjHKYLM0B8euZPZET0LWvnIHvJDKRDARhGsAtAeKrhDjG7R4fABxOYwC0indBMQ1rwobZxuCyONr7Tx5Tn1QfR3+pXYHMNSCxDLxR0KzznVbzh4ahBBJeXf9ztVfIIXSSrAyqLXskX8QirLJreTw24gW1HTETybv8Xqc2lNLxiGcKfnulzbhV9X0S0kw5wT8QkY57LvSd6v9GF7ufPrfCaLagPXzDDYyKwszkEV2TJJEm2GNehcX19WDOZZN/T5du0D6UzdgLSWLO1TiGAFkYflA5oAHXtwyuvGkG5zgg8f5ZDweQVCJ//TsyRMqu92EAD2n14NuRy/RO8qmVCLvUUizDLCXGXutGunYSWudvF1v/CND96b88WD53HxpxBPEc8B2PzZyhSWDAhQI2ULetiB8qFIQie13YTnb4kTNDpIuozQaK46Amb4G+F15Y8z+USsACsWHlog4qbSDKWii6CNS0eMQzXUYZr2R9LnoeseSHX4h3NlDZFqXY0st0u6B1eFIphA45QDwqNSYE+15FQWmTRF4EcV8cHWbjsQn53xvYjbdY9WRsP2V3TcqRbWYGCnCEbAfF1shfdslSAUCkgfDypA2vswdf00lAdx8oC8fpvlFXGNS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5106.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(376002)(346002)(136003)(39860400002)(366004)(451199015)(36756003)(316002)(66476007)(86362001)(66946007)(66556008)(4326008)(8676002)(26005)(186003)(6512007)(107886003)(83380400001)(6506007)(478600001)(6486002)(2906002)(2616005)(1076003)(5660300002)(44832011)(8936002)(41300700001)(66899015)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S1UQ+3J4HDmKhfvhJ5uSXlnaTuwdfaZeu1/1MIgkakigTjx10/nd57d9sj1UhtfYgTOsE5bi7x4EHZFRJZwjUjRM+/Vs/E178ocmtDaZ8fCMtk6GZesPlX05AyV3vR0FKJ7PAqTBTy2leGm2PgalNqOk4WMZqVhk8fD3IbQ0fSK24rGk0SSchaI5SoTokGo0hnlXSBLQMO3oiq2wH/0v7r4QzvfxWpLjD1kJxgZtE5Tfo76LEHg+awwOZvxe7twt/uzMv95dr88SYSPkzVqJDddE1ydaF/6r/LiXnqX6z94rzupkIxu3FobziaN9lscjz1R8QcNWKHuG9uVHGave8xiCy7jTdqKDzbcbvJ6zcx0rtN9f50xw9atO56MxTsgQi+si7NvsKTVT775RPWg/6PspFeg8KisVvk9+I/zDPfI/2qOuCb5119cqX1ER6MtFgJFwB+BNkq6bYMTDW3tCrnNJgm5Cduvuc6snxQd+QbRAQKNa4kLmf7fr2v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r X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3d4d287-e4a3-4d6a-80ab-08dafd7fde4c X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5106.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2023 20:24:45.9669 (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: R4giiI72e62MwjFA7PUYsQuft7Qzcb52CUAYbUtRhiPOAFOXMYs6wyGASgRLNdjoKFCuPbJUpVXMI9tHDDdaTBtN8EPmwVdFiri2yC94Urk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6013 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-23_12,2023-01-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301230195 X-Proofpoint-ORIG-GUID: xMeph6Oma-ZxrFpBPPjhdF6Thl1ZPNFV X-Proofpoint-GUID: xMeph6Oma-ZxrFpBPPjhdF6Thl1ZPNFV X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: D2AF0A001A X-Stat-Signature: fzguktnuciee83a9xdm3tg1dzwt5gdx3 X-Rspam-User: X-HE-Tag: 1674505496-258206 X-HE-Meta: U2FsdGVkX1/SB9M1AwH+q/OI3K4TqpWn7F7UT1ktZCMSMSPhFS7Yk9M8UtBdCqtdxCIQsEYcc/P4H6ej2erGSN+izmqAIS0ze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6X/hoqRsthw0cXUZLS/N/0D4nwGNYxI3Wb6AOOvlwKwjg3uQCtCFfNS34dc10ZPSUdTBfDixDEQjIa9f/fofb88gGxZtpuPrv8Q0PNGFWuG/4xTZ0o/0wHtFi1dM7/jk8jPmb59rC8iB83MQSze2o7xhiqKL5xd6TRNG7+avtV0Xu6nFw1vRAkraMeaRv1IdAX99aWoRLyIua2+hL1SqOqTOLtwreBs/374TNxiVdYjO3d4oRnftq3jxPYbM0D7klQC5jXx4HZ20W X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Remove one user of the Huge Page macros which take in a page. Also remove a reference to a head page variable by using a folio instead. Signed-off-by: Sidhartha Kumar --- mm/memory_hotplug.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index ad09189786b1..d5a0672cdf3a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1579,7 +1579,8 @@ static int scan_movable_pages(unsigned long start, unsigned long end, unsigned long pfn; for (pfn = start; pfn < end; pfn++) { - struct page *page, *head; + struct page *page; + struct folio *folio; unsigned long skip; if (!pfn_valid(pfn)) @@ -1599,9 +1600,9 @@ static int scan_movable_pages(unsigned long start, unsigned long end, if (PageOffline(page) && page_count(page)) return -EBUSY; - if (!PageHuge(page)) + folio = page_folio(page); + if (!folio_test_hugetlb(folio)) continue; - head = compound_head(page); /* * This test is racy as we hold no reference or lock. The * hugetlb page could have been free'ed and head is no longer @@ -1609,9 +1610,9 @@ static int scan_movable_pages(unsigned long start, unsigned long end, * cases false positives and negatives are possible. Calling * code must deal with these scenarios. */ - if (HPageMigratable(head)) + if (folio_test_hugetlb_migratable(folio)) goto found; - skip = compound_nr(head) - (page - head); + skip = folio_nr_pages(folio) - (page - &folio->page); pfn += skip - 1; } return -ENOENT;