From patchwork Fri Aug 25 19:04:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Kravetz X-Patchwork-Id: 13366220 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 14A85C6787B for ; Fri, 25 Aug 2023 19:05:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E056468000C; Fri, 25 Aug 2023 15:05:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D662168000B; Fri, 25 Aug 2023 15:05:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B470C68000C; Fri, 25 Aug 2023 15:05:47 -0400 (EDT) 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 A053668000B for ; Fri, 25 Aug 2023 15:05:47 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6607DB2440 for ; Fri, 25 Aug 2023 19:05:47 +0000 (UTC) X-FDA: 81163556334.12.38891FE Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 81EFA8002A for ; Fri, 25 Aug 2023 19:05:43 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=bWEj0ckd; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ryzbc2cm; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf02.hostedemail.com: domain of mike.kravetz@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=mike.kravetz@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=1692990344; 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=0ahRRIn0ZNn8lfsDqjwet4c+B7wLB9LxrxIa3Q88Osc=; b=AvPbzZuUusS5tKX5hthx0+5Or7d8aVmIxu0b7bZHT+0QoR//eFGh3AKHypK/X5HGuqCTuq 8iDSGa3R0tab5wWdFe7ARkluPC0KDQf4nnf3PxObp3FyhHMhb3qCtxSrZoHgkKCE/AYxkG FZCYY0I69OuKSg5MXXd9TP7HL7+6jH4= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=bWEj0ckd; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ryzbc2cm; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf02.hostedemail.com: domain of mike.kravetz@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1692990344; a=rsa-sha256; cv=pass; b=URUA4pYQ1/QiZHe8jjC0VTFsrzzA0yRm9SQP9u4C9eLEydauKaBSrKDvwUbTBW1so6MQih IbGxcCwzlBoRGGmawId+KSayrMoWSW2X0KhNQyiqpUjCTZHsl3Hx8qAn+0wnNdnodkqq1U QNDO8Vjrvj3DvzFaPccGrUHTCRiOtig= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37PIESZ0031124; Fri, 25 Aug 2023 19:05: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-2023-03-30; bh=0ahRRIn0ZNn8lfsDqjwet4c+B7wLB9LxrxIa3Q88Osc=; b=bWEj0ckdoCz9QYuzTiKhsyrwYkxPiRSZKmSCHTi+WDNv5P08bLhaNoeXFnR8oGQPVGjC Th43vBH5n+6Cmej3jr2Em274tWau3cMeFolIULCUo7V/EbrIH/lY/GAKIEzcprJNRU7B 0QhOkS1PUxwsCQ+s2ECIYLNvbiCDR0bjpCirh0eBo9QPpBBTQuVGCSghoNDWQNO5lVmq y2BT9DEFKRxeyMom9I19z7ecyQPPZd5I3aiUMV7h09QbBfvjMuVpb//+O/yo0+1gEKwP VBum4OnalPNBmB73AMpJdzFfu39gP458rJxkQpunG8AsOctY7gdXpRmwrpXiyd5QkVHj 9Q== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3sn20cq0e1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Aug 2023 19:05:19 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37PINm4A036073; Fri, 25 Aug 2023 19:05:18 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3sn1yxqsmg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Aug 2023 19:05:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jcn6NGYkcVYZpeKZjTGReRDxBUoRAXWqkxWZMQf6EmwXrs53KjnINPbuiuSJUH8AEZcEjpjbDnN5ICRu7OVei6MLoBs1bSjtWPdHKAZpcugfXIMw/tJ1I5GMKjA33YjRrOR5KPV+0XZHgWH94zlKuLHCWRBxlZogF3L/wv175wZo+XYR+I1iTsNVpj9nTFRPis1YYkbCLyP/HGB+aCSVY42fP0gk1KjpLRp69VCK6gRaU+LG8w0rzfHkW5U6p+HeeYTiiIxbGtvj5opSt1Y3yd+S0QJW9isqJUQ0EjK1MLhk2jNINg9XkD0KC24dYqUm2lo+vX26wAi0+I3cl0eXpQ== 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=0ahRRIn0ZNn8lfsDqjwet4c+B7wLB9LxrxIa3Q88Osc=; b=gwKLHoQTXle6UGGbWPTFAN1uzJECRXyO9A54NsSPw9kk77ZUJaai2wEhXmmnJB35YwLRhbitFofkniTcERBmuyPUy/NQTrHrXzvIE8Wub0im9DtKfDuDChfpa01qqiu9OHaAb2celMPAEjnUeRT5/U3pQqFSi9erani0iYf0y1EGKNyHTS0kpT5avt9MLPuSip4pReHBZiPG75ww5eleExjBn+5ZTBy4WVoPFGoj2WKWaJEmlWIjW/yP3Zyn1UqZMQ09yMHNgX0AA4QLilFUzuScn11W//6geuKuWeE8xrun1xC9s79bPbJskLSsPADQqH37j3gY2cu9/iQkkgjzxQ== 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=0ahRRIn0ZNn8lfsDqjwet4c+B7wLB9LxrxIa3Q88Osc=; b=Ryzbc2cmjPfEqj1AbgMeVVvNOga7q7UjZerj0WKU+0OBq0Klr6U8eW9f2DRqQbAr+D6APIKBdcj5HPho7muw2yNMH6/7awft6U5Gi5B9uQ3GLRWZZ7lLQR9MCnuTveiSVHosC6cgkkw0wNg3KXu1lys7xYW9twU4wjv8bj7I2Sw= Received: from DM6PR10MB4201.namprd10.prod.outlook.com (2603:10b6:5:216::10) by PH7PR10MB6580.namprd10.prod.outlook.com (2603:10b6:510:207::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.27; Fri, 25 Aug 2023 19:05:16 +0000 Received: from DM6PR10MB4201.namprd10.prod.outlook.com ([fe80::8057:a3e9:cbd1:252a]) by DM6PR10MB4201.namprd10.prod.outlook.com ([fe80::8057:a3e9:cbd1:252a%4]) with mapi id 15.20.6699.022; Fri, 25 Aug 2023 19:05:16 +0000 From: Mike Kravetz To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Muchun Song , Joao Martins , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song , Michal Hocko , Matthew Wilcox , Xiongchun Duan , Andrew Morton , Mike Kravetz Subject: [PATCH 09/12] hugetlb_vmemmap: Optimistically set Optimized flag Date: Fri, 25 Aug 2023 12:04:29 -0700 Message-ID: <20230825190436.55045-10-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230825190436.55045-1-mike.kravetz@oracle.com> References: <20230825190436.55045-1-mike.kravetz@oracle.com> X-ClientProxiedBy: MW4PR03CA0100.namprd03.prod.outlook.com (2603:10b6:303:b7::15) To DM6PR10MB4201.namprd10.prod.outlook.com (2603:10b6:5:216::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4201:EE_|PH7PR10MB6580:EE_ X-MS-Office365-Filtering-Correlation-Id: abedd79b-f5f6-4695-4fc5-08dba59e3785 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MAh1hHtCXEfiHswV0+4QMFeu7TMqA/19oyNn6ihMXY8ghVo8ZirDBie4BJ2ywESa4c1KaVct4cog5qWZ2sHtBLmhGD56cfC7At01ATEFtCWLHYWvINeVHIVLVe4T5HBeeIR7qRo6XgIUPHUJ2EnrGmTl4aTRljVlJLNOUTz0byfBEnF3gBJkuEkiv0D+73GbXJaZFXTCXtD5HeAlbIKIZiWYu5LtmRXMdC4BvV56yhHHxTHTXvnf6IIPXrHrKbSRZ81NA+xj2wjLeoGaCv/ovmVeCTRRAKYlyrHV1LikT9wbAR56O15o9vUhYwgHtBHXtCxB34jghBsz0I1ayhXcSbZbACiWUIUUcXFgrews5EATKbHSMAEqtMsf0x/TWtJQfdlx40YDPNxBxKzhWyOQbMORb6/RQQG9rjY0Xn8EXyqz/5YJ1BJOU8r+oXyH38WWJwTVQHj2xZ3c9mtGNZH5j+iHF7pNuix+/b661w26m5va1tUVIBYLb6s1k+L++T9ejycbrM2nOE5uujIoMxkvQuDhVxBkKZTORCLzYPkcJsA05VMb6TOZDEjonTxxasPL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4201.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(346002)(39860400002)(376002)(396003)(451199024)(186009)(1800799009)(66946007)(54906003)(66556008)(66476007)(316002)(478600001)(26005)(44832011)(6666004)(38100700002)(41300700001)(86362001)(6486002)(6512007)(6506007)(2906002)(4326008)(8676002)(8936002)(1076003)(2616005)(107886003)(5660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XjlqDGo8Xe377K10BWPgdkTwptcb1+yVQ9Aw0CXai1F2w/850iNopxTlvB7CnPeZO/jZta9Ns+s2G+0ves3PtF3C8FuHofK3VgSrjs3LVRUojZUFP6tz3XdbpknNlKgvRkTkREPD6DsGc5aiWWcti0dGR+i8O3zseVC1L02Il791KOIsgfuhli3lxZpX1Qw0L6N+UyX8OD+NgFoRmXzINPxzx7ibgov4m9DaOIojbOPt77a42V/1oTPfE4rvtMURUPdeDxMBTTqgGcbgn9vFuoqoV5HTDyYiJWh3SsKIRcG9eBiAq5AE25Ye52Lsm/3CJp3xSYJXa78nI3uk1koQ3tQnsLk4bM0InDBDEjIiIDb5WZxebnFpCcIvsLrTfmsLpBABMGOpJSax8dX2m8us5kv4PuMxHkoNjXkG77OP8t5whuOa0HgDrCSteLkX/A8CNgz7GO6VIIHXLFOmaLnGuro6VUePHbaY5/+hz8nu51xdd90AAgOmNdIJuUxTPFvYyLDxdaAoZ2kTKvGR34785ZOZX83nOzYK7cZ9E/OBzLy4J8CH916onCskK1hUlYrgdESBRd31tPBXTyUnTKV8m/x7s9ZAdbeZll5tqnzuXgLd6AUCevT6+EopYqUOdLyZlhlocC15IUUA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: EQogqAEtPqEPm1I6NwYwTlnZY/r0cinLfqoD1Ul2d5RDByWzbPJ2z7SyjhwDJqGDQVBczusYTbWXU/DU8DxCV+fOPk848vyu+B+kZpRwUfJ4wz8Sa7Wn2rMypJEf1PRsYjmt6djK2n1QLoDJ1opfRNes0cfmJ/cFZK1UVlFqcWbQ8rK8wivgcwSflqg5TeCNjwofFz/UNU8vLh6OHqVPA3a+sB/YnU1nlhXSdxT8NB/Mra2voZ50lNrHk2PHALTkNEwxNINtpqHPWEninTUAOSHiEQxQfMI/RPFsNUlMMwy0rM1rM76uPEhEuItWGVjOidbVdsrf609dh0sfgE15/EeUvDHy7Od7IStOC8vvB7GEFvBBxaoRkgS7iWoaTuUx9AqkQBHCGRuRcLq8rd39zDX+K+suAA0n3izVFS3SzeRpxWs3kndSas7HlVCl54RkpWV2Ysu/+YhpXGtBMOJtdGKDae5NuGcnRFPYzxJRi2X71UZf1nU8d4IonkSSJINcMG1775Z/xWNEmqNVwR7AI/91sBMz25DNjDTQlO7sdoWWDstsC03cUEGrAxPxgABQkZLCbylVqROvoPo3mUmOkehOomO5tborDX6i3x5lbBMc5//IV0+HdC+0j8WYfCn2F8nJKcNRBimBeDWptSIL3nzm+RBkERfiPGtl5Rq4Q9V3pxmvPSqo4WI5RYp5UtUhrJdoSWIQtMM+hje53btVCq6dmOMjivOL7Vl8dOc7QI5DkXX2EtdORO9c7pD8JjWJyP3C1taFoGPPfKpyzCjj7BcWYw0J2sdoE8wAJBDwG1OEnbXaSkg7a9uP9nMTx5aQjTEJoFBSWH/xDKufFsAQub5lm7WWxT3Q0tuuL1V+jQThoc19hvZ9dx8Rb1o14nUdwNdLEQFpzu8TDYWeGcv5beY4f9viAvd9TOZTe9zDe50zUxau89J62TVwdKdLSkzx7+dm9WESFaKy1jvVOYLEbEsPDywmof2gIQj1YJ7k+mpyhwNhlOZiiw/0aAsQEnPlfo2u6oWjeXBhORQH5bFjoSNVq0UbLixfHRGMou8X79zQOMFqaJjR9jDhay45tyYIwjH93pzgtLld/uoa7r+/nGbrbGkdWL0vBRsr0Ap0VPYHpbGSWVyAosTOtBu5fW8o X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: abedd79b-f5f6-4695-4fc5-08dba59e3785 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4201.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2023 19:05:15.9920 (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: yiVlx8AVcL/crN6CQLHEuuXU578cJnz5XmyNZCXeAtewUYg0erIie81AWy0fSOL2jDY0T3ZDNGaWSV0hYjus4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6580 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-25_17,2023-08-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308250171 X-Proofpoint-ORIG-GUID: _6aczlNKQatDKqsWD-YfwE6U4edUiDxf X-Proofpoint-GUID: _6aczlNKQatDKqsWD-YfwE6U4edUiDxf X-Rspamd-Queue-Id: 81EFA8002A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 37gqzngnus1n1y313ep7no33hzz99wpx X-HE-Tag: 1692990343-604532 X-HE-Meta: U2FsdGVkX184kQ8UirUnRyO37GHsEr5dIDUu5kTulLecJcUjJQmvMSyqN4U3NqRhhiuB0GYd4LQajZM6qpItCJ2tC20uvOchmEqtNy7GvS1c0sghZ5q9nfqaWxBvtA7Jp5x5njrDZKBT1qyd+Toi/qh427kX68tvs+zGIJ05WqUWxqpnbCBI1wMmf4dhoh9Paxa8FyCuWKXB44EoExGYbnYeRZpa5obMy1h8klPbED8Kx3KeJRajR2tK+E8qp7AdQq0bZm77NzuHy6H075Kfc8I81a7nLCjLPkU8tPwqFkXz2HhAY9QIK0xThISZAkd9Xprm6RkKqHdz1suiMpowbvxDgd4s9koyaifyIrwvTtDHh0kjvC41htDCaRi2ZyUhtctKWuQVLaq/WT5siwEKq6zaYNJcYuUQSaSLHY1ZppjiD9ExGNQxRBQnuAC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Xedgt+tuKE= 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: At the beginning of hugetlb_vmemmap_optimize, optimistically set the HPageVmemmapOptimized flag in the head page. Clear the flag if the operation fails. No change in behavior. However, this will become important in subsequent patches where we batch delay TLB flushing. We need to make sure the content in the old and new vmemmap pages are the same. Signed-off-by: Mike Kravetz --- mm/hugetlb_vmemmap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index e390170c0887..500a118915ff 100644 --- a/mm/hugetlb_vmemmap.c +++ b/mm/hugetlb_vmemmap.c @@ -566,7 +566,9 @@ static void __hugetlb_vmemmap_optimize(const struct hstate *h, if (!vmemmap_should_optimize(h, head)) return; + /* Optimistically assume success */ static_branch_inc(&hugetlb_optimize_vmemmap_key); + SetHPageVmemmapOptimized(head); vmemmap_end = vmemmap_start + hugetlb_vmemmap_size(h); vmemmap_reuse = vmemmap_start; @@ -577,10 +579,10 @@ static void __hugetlb_vmemmap_optimize(const struct hstate *h, * to the page which @vmemmap_reuse is mapped to, then free the pages * which the range [@vmemmap_start, @vmemmap_end] is mapped to. */ - if (vmemmap_remap_free(vmemmap_start, vmemmap_end, vmemmap_reuse, bulk_pages)) + if (vmemmap_remap_free(vmemmap_start, vmemmap_end, vmemmap_reuse, bulk_pages)) { static_branch_dec(&hugetlb_optimize_vmemmap_key); - else - SetHPageVmemmapOptimized(head); + ClearHPageVmemmapOptimized(head); + } } /**