From patchwork Tue Nov 29 22:50:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 27528 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp607613wrr; Tue, 29 Nov 2022 14:52:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf5d+S0uA6TO9F0oWbqXhkJn+dHUQjcv7I0u45UbSLohZbbyoFoAOvMYkDxtZa5mSBTZvhwq X-Received: by 2002:a17:90b:3544:b0:213:2173:f46a with SMTP id lt4-20020a17090b354400b002132173f46amr67492341pjb.103.1669762374476; Tue, 29 Nov 2022 14:52:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669762374; cv=pass; d=google.com; s=arc-20160816; b=bR68PD30b+Eq7KPNPrtRXAMowsnmAFgtGdR5qVBtcYiFuMbv8w6lJWvEEX8s/1aO5K jgIiRrA7csX3n6dzqSIofprkfuktUSWLNWK8IN3lHQbyijdA7Hab46rnncigv3unnQ8L O9kIAYLsAGkOb+YkuvIzQ0OYhZTGVfp4lqRMb2V0ZUdvpAgb/DtcQbXiW/1tgN910Iwl UA02m5tHN7jBgymA/kpc1TkVpMEZ4g/iZUetfrkN6vZ5rxzjjvLXyd1XFdTL4E+zUm9Y 5/Yd8FA6mjThLfi/DDG5UIJ1O3i5tn7d9hJIgZEvQNcKG3CjE/SXivY3tAaMxsKRbxfn M+Dg== 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=5+i5cFJ8kWF6G8sf4E5wI57dFP15IxoGxTJ3putGXAY=; b=feImJvVmNx01lv1/FUfQkqTBL1//TSEJ6voIK6aUuhHeI3aZJ6ZhnPsZ/WwjEKGowt ZOrtplsFzTdasr+HmCLYbMwgTGjQ2HAZPKxiXi7ECRiXzCx1alC/qzDtSgKWyA/9wBjz iz5y4tGdTkv2xRxrMqNd8hqJBsfYE0mJygJiRKuF9uuM+GU+G3ij59jEn9DZwGYivlGa rKzu6TTtDlVSPdUauO7LaGAQKceMdW8m6AeHBi5TWfi9CNkvaZ/EqL8AlGsaR0edJuQ9 sFheQAHSK854I/GVJTePe3rSi88j52Lt9Ucw8I2bLpahzRE4slumfjoLcEI5pK1zwxZ8 GRaA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=GJTXJmux; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=GcYcZq4j; 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 c13-20020a63350d000000b00477b3ee6459si15807608pga.74.2022.11.29.14.52.40; Tue, 29 Nov 2022 14:52:54 -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=GJTXJmux; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=GcYcZq4j; 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 S237066AbiK2Wvi (ORCPT + 99 others); Tue, 29 Nov 2022 17:51:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236912AbiK2WvM (ORCPT ); Tue, 29 Nov 2022 17:51:12 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5062370DC9 for ; Tue, 29 Nov 2022 14:51:12 -0800 (PST) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ATMECvT020355; Tue, 29 Nov 2022 22:50:56 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=5+i5cFJ8kWF6G8sf4E5wI57dFP15IxoGxTJ3putGXAY=; b=GJTXJmuxlEvTuttYDr2jx4fLe6X9hNNqJdcWgCkhnuegcjHMoQrDmPeMu9ybStJVYTuS v/NGVvYlfC/IpQtOA+fFN7Ys3EnRNaOLSg+GEIAEiIrv/SLPWHEEgrgS3d8IQimNyB39 +9yQNZO1kLB/O/1sqjhIsCnSmi2FiNYzZIDyTEhBamUp5wpaNLL+OoNBnl3E2CmmVesf 4aaWnuUACCU9S+SK9qz9ybKc0Fjhfhckn1gnWTVRzsfVeNvCQGIW3Legx+N5xLkxbwIA uBHRLvduLkQM1nhaNtSCk/s4SXGVKREd9v9FpfRsJVL3j26XAoRFpsRO1H5dHFApxUx0 IA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m3xht7m1v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 22:50:55 +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 2ATMbKGT026751; Tue, 29 Nov 2022 22:50:54 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3m3c1w67b7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Nov 2022 22:50:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GGouup2fAid1VzYimwHOcwh0/ij7aJkfC68b/VAcilxTbUz9mULlR808zBbS5J/efcLPh02L727AXh6aUbAOikXKbR58/qOKEUJS/9lrs23MYOj1RdFnezDORYU7aZireHmAtn2pUDptqXkbfCRcE/CnuGSjlbSJlk/sUdfxFNmlsQUSsFtWM9C9eYFRQ9sjZ5jdbW7bgYQzt4HoS/WJMn/8t5vYkmH3GsQXY/EkNmYNe3GYRtSaAwgPfR6fp01yakYLZSS+9evpvKmaKXypeGYPTKvGKWFS/KokPfsOgG87RnwGO/tEG5V31ur8Bw19IR7dzyIY2Tmz3DgDv8W05w== 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=5+i5cFJ8kWF6G8sf4E5wI57dFP15IxoGxTJ3putGXAY=; b=YvaTNfpZIbfLqQhRiMmert7DACcpdY5AmLcwUyLL9xCXzDi0zo4lhCTWwHZLmZjM3z9Sc7uHsMpWrF8JIX5EVL+kojy7+sPH6Kd6Uj/nKEQ4oho/IDxVNl2qDbRBseAQmmTFUAyHfVGVCP7jBvp6xx85UlLZmJL/EoOe6hP9vQKoq2m50KqqS+Wy90LGKbMBGWJmJGu/zUjSAheCni1wETpG6vRiWsuXpsouUpwrCvMasOZqYmazRi6jnDmUi51VBFffzXSzuwIXCpLqE1ATeHVFcdC/zHS4NZZ9z8hij3PTcbUhG6DvlOD7tZ0chESbTP+ndsRMenl4rt3dPJ0j+Q== 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=5+i5cFJ8kWF6G8sf4E5wI57dFP15IxoGxTJ3putGXAY=; b=GcYcZq4ja7zi9nPHD+pb2rMJfyC427m//ep0Y88pc+vos5fjIbPPADM8NxKdOajYckhBjmqbtlqxbHtOFxk7rgPINvki/m9u3jB2UuO89o6G1YgIlaQG39EoMnWExznCR8b9B+gwTDs3lzVSCQFJBxBk//QalHupOcpgPFu6sc8= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by CO6PR10MB5586.namprd10.prod.outlook.com (2603:10b6:303:145::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Tue, 29 Nov 2022 22:50:52 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::3702:7db0:8917:9954]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::3702:7db0:8917:9954%5]) with mapi id 15.20.5857.023; Tue, 29 Nov 2022 22:50:52 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, songmuchun@bytedance.com, mike.kravetz@oracle.com, willy@infradead.org, almasrymina@google.com, linmiaohe@huawei.com, hughd@google.com, tsahu@linux.ibm.com, jhubbard@nvidia.com, david@redhat.com, Sidhartha Kumar Subject: [PATCH mm-unstable v5 07/10] mm/hugetlb: convert enqueue_huge_page() to folios Date: Tue, 29 Nov 2022 14:50:36 -0800 Message-Id: <20221129225039.82257-8-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221129225039.82257-1-sidhartha.kumar@oracle.com> References: <20221129225039.82257-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: CH0P223CA0011.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:116::26) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|CO6PR10MB5586:EE_ X-MS-Office365-Filtering-Correlation-Id: fccaf2cc-c035-4088-110b-08dad25c2ad5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AE0AK+qYqiz6a3qPWEmKAHmLA6htAxb8oNoo4I5CGZ4GkqtFi6MdFT+88ROFXmJn+WdgAA8r5H9rHI41cKLqkPSQhC1reVIvPaHoMhv+x5phD87bUeFSWzpVyZgE+96VTwY/nfC4GRPNoZ/xgYXPiWYamcY0Sry3G8a+F/Q7sycy3lXJQPqOcA+3skdZJrMk1GLb+OQNu+8sQycEMUwrhC9jcSHFqMI9KErPaXXLJkBFC25Kv8x/1XWWjQizfYJ6Z6qt9GSPTx2KAGhQjyrZ5Tf3og5Piv6MrVsXh1flDaQpOD5vrNkdpYmzTR34S8IKhfWDPz1R6kvgzJshovA59QrilLldEb8MmfMv/N+uI/9gSEkXZL2fZSPgSzp3UPVl2iIdfSDdf/3sHKmbiHqFipuqwU0HYxJyYjgKDlPJGJPGwqiAhzTgBvMrD59jABq3BoFLZp3dkUBwyRB9ttHjJ1ZCGsorrTfuH13ZPUixk/fBf7RSnsIEG0dJXGcGXzDPgfB0KftdsnOdtIglUfBy1Ukn655e4DGWaaXoPaK6eh780/tb37axNiPHXhDuwZHIOYMjEbjvAtEl7bwq19pbkh28jVO7mOHW2P9IYBVKKFwZ7ZTwpbOjKKTRC9T5ETM2O6g8PL6oZqZTlrphrw3JX2UvyrshG0r0IQmiyYmXQ+cgE+j6FWs+kC9EcJ6MnOrH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(346002)(366004)(39860400002)(136003)(396003)(451199015)(2906002)(2616005)(6486002)(186003)(41300700001)(1076003)(478600001)(36756003)(6512007)(86362001)(26005)(7416002)(83380400001)(38100700002)(6506007)(8676002)(66556008)(66476007)(4326008)(6666004)(107886003)(44832011)(316002)(66946007)(5660300002)(8936002)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BTRBQb7Owkh6FM7LAhC93iL6Q43wKVPfs5M/morIqekFctCBUipL+uaQB7Ez9K/2kq0LfFMufNnLlRQyZ1DIC45r7rRIIaljx0wnIIbxAhAP2cwXb12s/DE6vA+wy0Imz4G7Ljtrv7qKy9YT39UOKtGlveVmCnUqvqGwS1C1O+NrU6CuqlaO3W1+Qx+V+ltIs47Bsi8Mnni4XarHg6Ny5ewRMypkx4vDPa4ju0NOXfAyleGtqzdh2LStxyl1r9AbrNj7A0dBrvfee0pNC0JupWzkaRdoV9MXSP/Ppitmd17IVqXRW7oiGDLmf5bg2FIUNPPUifT0HTvLOZvkX2POzNjJpY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tT8Q8GgYQTTsCY1LHQvTvMfKCwmisGjBiBnOylqb1fIGy9wBPmtvgRAiFDgYPTeVvPLJhNmMFzNC3+TOaIP1Ky8EOSMckTHO4KWI3+i4yi+z65qlpAPndTatGrsDn6A6J9yw29FMnb1natGxZY+3+oU11keDIz9FdSo5y5+mqlI5ywM+gCMCgyzvVsWx4XBsh/9lwf+hr8AMxpaxHKePE7pvJol0mOfmP+qaSDSNf3dZtpwnToENOOUBTyDYp8zNQaQS7K2ltQ7PHO1yX4HvuE/e16OiR+W1+SOAHmUhWto7kd0pPkLMZxDRhCv6yTU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fccaf2cc-c035-4088-110b-08dad25c2ad5 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2022 22:50:52.4558 (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: mimBSlHJQjMHi47JATmhwfHw88LRLBwqdaswpel7FDWS1iaFWUkTfhY3fhYsaDh3Ljzh0d7uFF/nF4AyD/ewF0C5JMiPVWPEyRczSDQENzs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5586 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-29_13,2022-11-29_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211290137 X-Proofpoint-GUID: zoup_tALKEOz5kMrv6Cwwv0OJ8OjBQg- X-Proofpoint-ORIG-GUID: zoup_tALKEOz5kMrv6Cwwv0OJ8OjBQg- 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?1750872751488462249?= X-GMAIL-MSGID: =?utf-8?q?1750872751488462249?= Convert callers of enqueue_huge_page() to pass in a folio, function is renamed to enqueue_hugetlb_folio(). Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz --- mm/hugetlb.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 57909a0e7157..c889593d5053 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1127,17 +1127,17 @@ static bool vma_has_reserves(struct vm_area_struct *vma, long chg) return false; } -static void enqueue_huge_page(struct hstate *h, struct page *page) +static void enqueue_hugetlb_folio(struct hstate *h, struct folio *folio) { - int nid = page_to_nid(page); + int nid = folio_nid(folio); lockdep_assert_held(&hugetlb_lock); - VM_BUG_ON_PAGE(page_count(page), page); + VM_BUG_ON_FOLIO(folio_ref_count(folio), folio); - list_move(&page->lru, &h->hugepage_freelists[nid]); + list_move(&folio->lru, &h->hugepage_freelists[nid]); h->free_huge_pages++; h->free_huge_pages_node[nid]++; - SetHPageFreed(page); + folio_set_hugetlb_freed(folio); } static struct page *dequeue_huge_page_node_exact(struct hstate *h, int nid) @@ -1549,7 +1549,7 @@ static void add_hugetlb_folio(struct hstate *h, struct folio *folio, return; arch_clear_hugepage_flags(&folio->page); - enqueue_huge_page(h, &folio->page); + enqueue_hugetlb_folio(h, folio); } static void __update_and_free_page(struct hstate *h, struct page *page) @@ -1761,7 +1761,7 @@ void free_huge_page(struct page *page) update_and_free_hugetlb_folio(h, folio, true); } else { arch_clear_hugepage_flags(page); - enqueue_huge_page(h, page); + enqueue_hugetlb_folio(h, folio); spin_unlock_irqrestore(&hugetlb_lock, flags); } } @@ -2438,7 +2438,7 @@ static int gather_surplus_pages(struct hstate *h, long delta) if ((--needed) < 0) break; /* Add the page to the hugetlb allocator */ - enqueue_huge_page(h, page); + enqueue_hugetlb_folio(h, page_folio(page)); } free: spin_unlock_irq(&hugetlb_lock); @@ -2804,8 +2804,8 @@ static int alloc_and_dissolve_huge_page(struct hstate *h, struct page *old_page, * Ok, old_page is still a genuine free hugepage. Remove it from * the freelist and decrease the counters. These will be * incremented again when calling __prep_account_new_huge_page() - * and enqueue_huge_page() for new_page. The counters will remain - * stable since this happens under the lock. + * and enqueue_hugetlb_folio() for new_folio. The counters will + * remain stable since this happens under the lock. */ remove_hugetlb_folio(h, old_folio, false); @@ -2814,7 +2814,7 @@ static int alloc_and_dissolve_huge_page(struct hstate *h, struct page *old_page, * earlier. It can be directly added to the pool free list. */ __prep_account_new_huge_page(h, nid); - enqueue_huge_page(h, new_page); + enqueue_hugetlb_folio(h, new_folio); /* * Pages have been replaced, we can safely free the old one.