Message ID | 7b985a20dfa549e3c370cd274d732b64c44f6dbd.1725040657.git.lorenzo.stoakes@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 3C9AACA0EDC for <linux-mm@archiver.kernel.org>; Fri, 30 Aug 2024 18:11:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E73906B0189; Fri, 30 Aug 2024 14:11:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E22776B018B; Fri, 30 Aug 2024 14:11:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C00836B018D; Fri, 30 Aug 2024 14:11:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 955CC6B0189 for <linux-mm@kvack.org>; Fri, 30 Aug 2024 14:11:01 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1110D120366 for <linux-mm@kvack.org>; Fri, 30 Aug 2024 18:11:01 +0000 (UTC) X-FDA: 82509703122.18.CF3BDFB Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf12.hostedemail.com (Postfix) with ESMTP id 88E5B40016 for <linux-mm@kvack.org>; Fri, 30 Aug 2024 18:10:57 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=B2fAM1Y+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=whFFMXVU; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf12.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1725041384; a=rsa-sha256; cv=pass; b=7AfWuhyVPAFP7dc/VyXVhrm6RxBholeZMu5Zng6/9YjD9yuo+CLitBccYUyvbT1eGfzkmQ 4ghz5mB5IqivUAN1I9jAWiohbonrhUjV7oe3qSEx03Dfz4VagCUHwOSs86tbt0wA06Kx80 xBrdNzNXEGA0H212V+TWZQvszGcxlzQ= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=B2fAM1Y+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=whFFMXVU; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf12.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725041384; 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=qIoHvPUCvGwYLbS33Siab/t0SU7czQc2ciQfFTcxWiA=; b=ZgHVswRNf2SyOAtYxbLBmHOErhMNynU7JfTEjRoW4XR2C5i8jf6kF42mUjECDQjZnxzsB+ 7ALP+H/WAyTAx7GWVKAv5+Wgvj/olT6E2By9gt/EhA92b9270J0wGUXIyqOBawH5haNTy1 YtkjOiECZe1TdF7g0gr2SpKv01DVIr8= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47UI0TTG014448; Fri, 30 Aug 2024 18:10:54 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-11-20; bh=qIoHvPUCvGwYLbS33Siab/t0SU7czQc2ciQfFTcxWiA=; b= B2fAM1Y+85u/XE0paIvJ+j9UZIy0pRXqUY3lTDiFUqeaiqui+5izIKtBZnxuCgO8 UDWaxVzxu/wXgnCRcDY5Cyu0xFn46IVRfXDJdIOr+XpYmkV5LEzSC19/YYpL2MLf ZkYVKmX9yHj86OInDFb2uqBiUryiyCQXs1t4N2RAvqyV0B5fcHlsHDJ2wk5vJwZ7 ZrJl4r+gxBw0cjJQw+K5A/Dw5HKbSq3+CqlGKNw/qIPGL2q0FXdsb7cIL0/flj59 nQTg/DiY3ECjpiqJHUA5CRKP1qeN7B5FBf0tDiXdQR8tRR2q1uAEutStpKk2AZ82 +XULp3pN7Gg85v4x0/MGhQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41baa916xv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 18:10:54 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47UHGGsG017489; Fri, 30 Aug 2024 18:10:53 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2049.outbound.protection.outlook.com [104.47.55.49]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 418a5wru9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 18:10:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MKKpqmiUGbsW7lOXoai3Fjoj9GRl+cClhhK+VYA7nZH1fPvGwbYRBhetkmpCNLeM8ztykYzA7N7Ah8/Q27MFV2BOwPL5t4xfptkV8RK3qCZ4AmSQ7Dg26x0Lnz6dOzX2zML1PyPHqJZFXP0ID/n+APhDOk6/y3LGOe88lSKa5daQQcRqGKt94JDMauLmnezUkDEi7earsP0QN8Hhk/aaRVyaSKj8hrIQwgT2gmxZTvJk+PFccmU3mZj+XklLBYMaoQmW2dzQ8/zKVuosbiMKOdtQ1+xxCba+Z3GePAZBB5n5GP0ACB6DFQqZzUcxQIRVxYJFTHLA+DRY/BTEJhChnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=qIoHvPUCvGwYLbS33Siab/t0SU7czQc2ciQfFTcxWiA=; b=qqqrH6Ucpp19x0uWBF72mDV4Z6mQ00CVECTWYm8LuxweULkX1bsdFQ7Lncj4yicjCECFPfDkedfcu/MXWinXcqtWx6E7iiuOimnv6+5XsG4K0YI6cxnBA5k27cgQGHN/+9pNaU0t739xPDo2Ht8OhEdrhXHaukX2DK4ySxU1d+n+taGcr2RFPNhLwEbOKCYv6cRP9dDshyRuv8mtuIxVSPyhN2IbX3+F3fPfV7v6ZieRpLdxMjRYBJS9TJa+p9Ff52yhf9GRMBIATcz4MfNZI7mQk6c5g+ozj7i6woV6+sdFQHRbDvv2lZ/Fi1DnDaGUMpQEpLi2lDVvnP77adqjCw== 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=qIoHvPUCvGwYLbS33Siab/t0SU7czQc2ciQfFTcxWiA=; b=whFFMXVU5hGx/CSM/nXLTPGvLmEHyY3zTCJJYiwGJYdcGfe+PFmZAdTyZeIo0YU8voHcspsGnPr3V6xg2QWllZDzbTmiMDMX+CEG8s1pM3M3R7/oxyRsLwLqrkDg8jinDjN8XtwCFO+G2pxcvsjr5iRhXc0hq7ecbK+mO+PZyug= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by IA0PR10MB7276.namprd10.prod.outlook.com (2603:10b6:208:3dc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.19; Fri, 30 Aug 2024 18:10:51 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%5]) with mapi id 15.20.7918.019; Fri, 30 Aug 2024 18:10:51 +0000 From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org> Cc: "Liam R . Howlett" <Liam.Howlett@oracle.com>, Vlastimil Babka <vbabka@suse.cz>, Mark Brown <broonie@kernel.org> Subject: [PATCH v3 08/10] mm: introduce commit_merge(), abstracting final commit of merge Date: Fri, 30 Aug 2024 19:10:20 +0100 Message-ID: <7b985a20dfa549e3c370cd274d732b64c44f6dbd.1725040657.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1725040657.git.lorenzo.stoakes@oracle.com> References: <cover.1725040657.git.lorenzo.stoakes@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0489.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13a::14) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|IA0PR10MB7276:EE_ X-MS-Office365-Filtering-Correlation-Id: 12d88bb1-59ab-4e8f-c52b-08dcc91f14ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: zuSQF8VwkJkANU6Kpg8n2HftcitlJNXW5sjz2YW5ggWy5Ntq3CyGPz5DJMdHWs8xWwlj894tbQuIe2mq/0bzWKlgSBqyrbYKg2sWviob9JO4QSsAu0ngH+/vUgwiYFFLD5mKUlVTuAfU/NJTFD7PyWYjAwfetRyp9bQSjSeGCnLPPL4JrjNX8qvH2o/ooENMZeN2jUOnskudtIGoupPdF9PoShgTlj5j/YjvPb4vztNqXt2A9geDX81D6iSbtSKMBhsVtRD5zQjij9aFGOWXt1GeAPkAuTPxLFR/hxDYekAFz08wa+99xZjoJExSstZEJQz3L/Br6O8Tb/1FDrmWUOZRFJ4aknfodaoq0OmQT49y5WVEtcwpVzpB+4F2nkLuHq0g2mDzNP6b8Y7L/+NfMLjD/9C4+udA2H5/oS5Bz71/PxP7V1Nfuz2AyTO+dKDWAx6O4sjBiA0Yky3nYRVeLPrkmCjRX1Cns9AA4/Q3OcPtRd91vaAZEGhWtVdRoA/uadiMKQSaJWT1TsLte0KABpqzsgg8JVn9ywJHFSznsThIzc5SF1tjlgjHo3aLu5b6rCEBb585iQxzlX+B9xAPqyQ+Qws9GPbR5oVkQ4/l17yVuITs13CNJINIJBqyTMBUO8adffCUDezyzJTflEBJkgAt0Q9p3DntMFyNDgHhUuLfmEKW1lM36Srb59VOCGjmEfVktLfv4Ta/9F0HmXzS7d1TvuwWUdTa+rgHhnbsuP4cEFDSaBPxMUOWJj9eNwv8Z5UYSLj+OVAGJDYNVjJrIMCKMSW6NZxQjs9HZ0pg8Pj4bJ6upnAyscWGhEgbxUiBV7RMzc4qYCb9hoV8YZTFjcvI8HCixLnOZ9Dsm2+i3YEvcLB5qwe06dQSK8nNOcVsy5AufVxV4aGTbPoiZO5/IaHEGn+SotmafwDP8CmtxC6IXtn5mPI3myl7bk1b3OGzuYmkbumIuoN4UkG6WFHzhrXctva+K1gyMwGo941EBMNTnkY3OmBcM9svdZFQ6uYaFnQAYf0CS1J4ZkxbD1LHEFuM+lsBioT4q42BJ3c9AN/p3dUCEX7v6NrTu8aM8vXYa8yZSZNe1TTdopAXtNrw+uXMgy2RL8ybrnhjKYEeBZi/NYEtJAxIFozn3pwTLgDZ4zItabi/sWwN3ZilCxb7xWBTv9d9eVYF0pmjeCFI8mdTNhr6G4GSS9GYsRC0GX9UQ58DzIy49F55tENz2li20MwKtfSOXynmRW16EnQWqAANF2z5r5qS1Oz7TZUAQ/KNgyjNh32LxGu4sDKx/jtQg8wInZ/T1QOtTxqmwYdkvjV/68cYklGlmXefRk2/vE0QTwrDxvSOL69RalJeoX5l6g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: llFIAmnUNsCditAOFfLUP2xyH5tx5ZChcSAnPBMw85aiKhAMNZwuUhKfS5RHhccC2s3SP3q3p9DFR+jBCIWXX8PM0PSBEjy6SVTXM+03Gv8swCB7vaU43zSJ4xF2UHv/geQDgZi4HMmOr3iHP1Tz43ckRbg14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zg0ev7QiX+fI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12d88bb1-59ab-4e8f-c52b-08dcc91f14ec X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 18:10:51.2584 (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: at0y1F8Z67fj6ADpJ0Q5I9mt4iF7n/ZazggN6t9P8T8tcCCzYWSeOgRNx7VOuUVU8Q1WtsnX4ejw+NESyfO4JmRmqc/XbtTc1JtpM9tULJE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7276 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-30_10,2024-08-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408300138 X-Proofpoint-GUID: 9u6lph1O55kfc2YFbuoz_DmvqNPXBxKA X-Proofpoint-ORIG-GUID: 9u6lph1O55kfc2YFbuoz_DmvqNPXBxKA X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 88E5B40016 X-Stat-Signature: uzfawugshkcinr5msw4do46xyxf1uxp8 X-Rspam-User: X-HE-Tag: 1725041457-305799 X-HE-Meta: U2FsdGVkX1/KYgmXqBAAWB8Lf7OBmF1sc7CoXKK7UBpD31/6TSYgTa0lKkCMlnYpf3HOIZF9Uu3cYiUG6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Tf8cgvTEpvZsCO4mVJ0ZesgFsRfOHOJYpv4bM2J6a/Q7TbnIJkX8xAYBD8KCi8LAdbQIsp0nvkvY7Ls3QcOGVRNRrdWSf12WWME6Ak020uA8jiNt2kRKSNp23TAMPitRdfApzogclaybkC4abzY7oows4ViKJaDUQVfucIfNa6ZpkXecHVHM5bqVk2eoWyL06VD7Ak0g724GnJYAC8RWhyd6dcUgkrkGci72fyD06813s3aH1mvnOprpJVWFM45m0wKhJd+pMgLDiWI4mfaZ5rhkOOhDRtCNbUNaEJbjC8v15aByU3EZ98Jt3H1joYOEAgV4DRftBjAJT95PsAaI+QeN78RZSdUMQ8SqvT80/83g/zCb1RmAPUvgo5uPNSqmtka/53yGGNlJw== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: remove vma_merge()
|
expand
|
diff --git a/mm/vma.c b/mm/vma.c index eb4f32705a41..566cad2338dd 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -585,6 +585,31 @@ void validate_mm(struct mm_struct *mm) } #endif /* CONFIG_DEBUG_VM_MAPLE_TREE */ +/* Actually perform the VMA merge operation. */ +static int commit_merge(struct vma_merge_struct *vmg, + struct vm_area_struct *remove) +{ + struct vma_prepare vp; + + init_multi_vma_prep(&vp, vmg->vma, NULL, remove, NULL); + + /* Note: vma iterator must be pointing to 'start'. */ + vma_iter_config(vmg->vmi, vmg->start, vmg->end); + + if (vma_iter_prealloc(vmg->vmi, vmg->vma)) + return -ENOMEM; + + vma_prepare(&vp); + vma_adjust_trans_huge(vmg->vma, vmg->start, vmg->end, 0); + vma_set_range(vmg->vma, vmg->start, vmg->end, vmg->pgoff); + + vma_iter_store(vmg->vmi, vmg->vma); + + vma_complete(&vp, vmg->vmi, vmg->vma->vm_mm); + + return 0; +} + /* * vma_merge_new_range - Attempt to merge a new VMA into address space * @@ -712,7 +737,6 @@ int vma_expand(struct vma_merge_struct *vmg) bool remove_next = false; struct vm_area_struct *vma = vmg->vma; struct vm_area_struct *next = vmg->next; - struct vma_prepare vp; mmap_assert_write_locked(vmg->mm); @@ -727,24 +751,15 @@ int vma_expand(struct vma_merge_struct *vmg) return ret; } - init_multi_vma_prep(&vp, vma, NULL, remove_next ? next : NULL, NULL); /* Not merging but overwriting any part of next is not handled. */ - VM_WARN_ON(next && !vp.remove && + VM_WARN_ON(next && !remove_next && next != vma && vmg->end > next->vm_start); /* Only handles expanding */ VM_WARN_ON(vma->vm_start < vmg->start || vma->vm_end > vmg->end); - /* Note: vma iterator must be pointing to 'start' */ - vma_iter_config(vmg->vmi, vmg->start, vmg->end); - if (vma_iter_prealloc(vmg->vmi, vma)) + if (commit_merge(vmg, remove_next ? next : NULL)) goto nomem; - vma_prepare(&vp); - vma_adjust_trans_huge(vma, vmg->start, vmg->end, 0); - vma_set_range(vma, vmg->start, vmg->end, vmg->pgoff); - vma_iter_store(vmg->vmi, vma); - - vma_complete(&vp, vmg->vmi, vma->vm_mm); return 0; nomem:
Pull the part of vma_expand() which actually commits the merge operation, that is inserts it into the maple tree and sets the VMA's vma->vm_start and vma->vm_end parameters, into its own function. We implement only the parts needed for vma_expand() which now as a result of previous work is also the means by which new VMA ranges are merged. The next commit in the series will implement merging of existing ranges which will extend commit_merge() to accommodate this case and result in all merges using this common code. Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> --- mm/vma.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-)