From nobody Mon Feb 9 14:02:48 2026 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C10B334BA57 for ; Fri, 14 Nov 2025 17:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763142837; cv=fail; b=Z9HvhafwbeRJkSAFighoFc7vquLe6s80e1qm2BISUAQLOOfHjSkEswh0FQzIkne5Mmw/Y1F9TVXA6MaWmUqCKJ0uMtnugBBVvO6mcnOH3IqUESszC4+BWsk3KstAw3qd7bIOxiimraARSAkO6pxxxz18ymRAYvX9OfB+WZbkdUM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763142837; c=relaxed/simple; bh=eO1BvUG965h1/bX6adSL1Th5GkS8zx2FgVp4he7q0is=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=pXXuo+dgBUz6oPgKGO1u9E+A8IxHsc1pjSjoWMyekLlHpIQXWHYFyCpDuB/a6PHuYldWvIGPJVmDKRLpUTJOxz7l1+8b4ZXFTL7/cdY1xem/8b0ugs0jreRXsNIPIeJ15X5mQ1gz0W9kPgDDrS/CXn29ImzaifbgIGCeMceNx6k= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=nsQ8u76B; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=IsxNocsz; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="nsQ8u76B"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="IsxNocsz" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5AEGuvTb003103; Fri, 14 Nov 2025 17:53:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2025-04-25; bh=ZPdB7gtkUp8S4WYFdjxlBeL4fjTzglCqepHicN2IE7Y=; b= nsQ8u76BPWinlDBpSEIzmiD/nCf3x/AdU5OsehzS1h66Whggkx/1FVzYW6eGnioc o8YhUSEhhaayV45DiGIkod4UWw4HWmAdAC+xzS6hNzfVeCYkF1JVbul6BRP831au xmwRc4oN5g24AMLaxsU0lwZVxG0RO0ZOiAXh0kg7YM2AhFKkNrHn8bf7l/FZzRbe kMVxP5l//cdAOdVxNf3Usoo05nYecdapdWL6DGer9IrpwAbOTil00Pdc71BVB+WJ 2KVh/zo432X/E+xKG+pWTtyG1b4VLC427RNYhrsgz6BAr8UlUk59qFlZXzPE28yR MxC7WGk9cRgfJJy2+HjgcQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4adr8sspkh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Nov 2025 17:53:30 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 5AEHqDbb011007; Fri, 14 Nov 2025 17:53:30 GMT Received: from bl2pr02cu003.outbound.protection.outlook.com (mail-eastusazon11011041.outbound.protection.outlook.com [52.101.52.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4a9vaqm1y7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Nov 2025 17:53:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yZ8Z8m4lnOKGxCW6iilncHO9BY6Wkh+aYXYzxHenVZ4yoYvu/YR58bYtf07Rp5nicuMC6ca6NjZmQD7FGMG/UM7V1Y0ZT9PQN1AJ9sNpJk+qvTVP7Qn90DhfTwA9Pxhg66KtHyJJ7Z4giaC5HBBrE7OhouSIdJPs7fICQV+7bBis8sy3bqjxL/DkqkG53V2L/ouUYuMP5DlBt4Q157/79IbBsyHN7ZK5CCaJ0OKsrEjbF5/9QYz4dS5YYomxFEjvlArGtZVhxtgKPkercre6u1Y3+LEJd8Lz+kIFv9HCRhz327xy85JaULANxZqIMzG5z1VT4EHtf/4nmu8ROcXeBQ== 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=ZPdB7gtkUp8S4WYFdjxlBeL4fjTzglCqepHicN2IE7Y=; b=O71a59uBI13gVzC3wTF8WUqhCd9NNa7dkARd/XRzXEnV+8zvuRmYiGiGrCJpx3zAgYK6wnuiBXTphzzB6IIs/rmB34tfWquS1dg2UMa0ZMRTC70eCuAHe3bROLa8/Z7wUjr1Li0E4jJGq10vl30BfyD1x5Sy3U9OgpKjV8FsGSRCOEuynSqBMhdlLwE57hlAcfGhE9qTcChOO8TYM1nlcgp0WMO0+gjBqPDraEzjowGojHIZlSKWCbqaG/tUXDFvREfl+yP4j93Fd2ShMdatY1tMk2jAn8bx8QUulz8OzmAJ+Gy+Ff3pc7eGVRkv8728KD+NbYobXg60vX/Siv9kgw== 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=ZPdB7gtkUp8S4WYFdjxlBeL4fjTzglCqepHicN2IE7Y=; b=IsxNocszWLIbwI8VEmG/61b/GRpBqCuD9DK0Qn/8N5p5Oacw7BdJmsJvtoQwXVrMLu+nANG4ViflZ6CjDIy4aggwNrviM1uve+phENaehNfsmK8x/rM8DXJcf2u4dQSPm5ZoM2XyIpE1Z9RvjxaNqgUXyND5yJdW5HTnoOPusSo= Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16) by CY8PR10MB6756.namprd10.prod.outlook.com (2603:10b6:930:97::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9320.18; Fri, 14 Nov 2025 17:53:26 +0000 Received: from DM4PR10MB8218.namprd10.prod.outlook.com ([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com ([fe80::2650:55cf:2816:5f2%7]) with mapi id 15.20.9320.013; Fri, 14 Nov 2025 17:53:26 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: David Hildenbrand , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mm: propagate VM_SOFTDIRTY on merge Date: Fri, 14 Nov 2025 17:53:18 +0000 Message-ID: X-Mailer: git-send-email 2.51.0 In-Reply-To: References: Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: LO2P123CA0013.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::25) To DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|CY8PR10MB6756:EE_ X-MS-Office365-Filtering-Correlation-Id: bf4314e4-bd63-47ef-5cc0-08de23a6b678 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?kDxDMz/Ch5mdK84hIjPPKbU686rk51NLrSm9/ZZrVaFojEi3QEZ125dVfAZf?= =?us-ascii?Q?2cKB0UkpugnT333pBwJajJjykJ66v+d8VJFebn3gtHGb8+xcW/4QsquBrZYI?= =?us-ascii?Q?equWBRlBb9TWfwqKZHo1yjc9h25JZvhBaPNSuBtOgE3ArtA4+xTQC69ATVSi?= =?us-ascii?Q?BoIGKzSR4BMymmYDU9aF1+rusjjtfSiIO7PVa6ZQOHUGYlounetY3qU8vRzJ?= =?us-ascii?Q?wMAV/18jz1+dVbmhzLxtWx1TDRIlr+FwXl0KTFzcJQBV7OildXfnnX/RHIZ3?= =?us-ascii?Q?zEsgmd9LBn4x1OtakDbsXcW2NPK0hNsH7MyGv4wjiFsBneX9o2PVVTOoNTQ5?= =?us-ascii?Q?BFD3GcxgErQXsGRJY17fU+87IREiMEKt583qEVHo6BLyx8G5+ONo71gEDSrK?= =?us-ascii?Q?D/Vy+Jnzk6zTpgqUB0fhV/dl8e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IV6EImrQEe/fRdecC0v0oENjuIbKGnlQcKyvWHLbu7S3Yt/CDTfK26go9BV?= =?us-ascii?Q?5CkNmgEe7x2qYcVFCxfHmfasgwYyW9XWPXxBO35H4AZEjwuScqio7L+SmGiI?= =?us-ascii?Q?r6iZTMW85l+PpUYx2aPdxudI0eJ61FyY?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FqKr27K1AlbDMKfkAdj5kSApO+mS5/ZzfEwzXB0OX+yxHxGeUi9gv+pYA8zA?= =?us-ascii?Q?pvM3QQmTrt1QCBSIaHy2AB0Ff9OsdKA1XnLY2GzTR1hFyHU8cjOHmUv+/yIy?= =?us-ascii?Q?luKOVGF8z6Hnjoktd3x7qE9DVgaUM+aJ3JYxbhCtsJXtEek+esVy9vCr9+uN?= =?us-ascii?Q?Mwt2u5vbP5TnT7Suj73LPW9NHzXUsSqNKDNP6YiedTYVrlHvJkXQIW4jNBCC?= =?us-ascii?Q?Y5PhSgQyIFkKThR4MRQBUnmiuWVmJu5wBQfPnsVEF9a3R9b6VX3dzRFuBhmG?= =?us-ascii?Q?jZqNcJQoB93yQX5kPVDA9XIlyqo3uWER6iPGMM//bCk9oo/1JXMgCVG+BEat?= =?us-ascii?Q?qWK0q/TeRJNJbrmZXtptoHRgTJkZSaQVG0hkx3TN96lyvBAFl+IyE3XciyDG?= =?us-ascii?Q?wqCN1QWw6xUUFaUgetNmssUQ4kI6FNEMAv3mELMlTl8F3/JSIA6ma/o0sBTc?= =?us-ascii?Q?KApfA1ZhMxDyLFcQZJs5a3bt0G/Iawc7YGI6OQ8+EzMt+y676YbqogN+l4va?= =?us-ascii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e+IPodJDvYE10Pb12WbUVJWz?= =?us-ascii?Q?7rYJIkHTnKJBYIu97hjPoaB9MXgf31Dn4tjEAm9lQPJSCu1OqLOxp1ltvyID?= =?us-ascii?Q?GqX0tmvDjih5ivRFPA4GxXxC8mRrOQO4GFDmaf3KSROtqLFWshEyvbKlBTmN?= =?us-ascii?Q?qIkFxC/ksSo0J8oCJcaBKQFoBiyLcfR9bLE/6iNTbQZ7mTzU6LOOEQQ0Necb?= =?us-ascii?Q?aA=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: PhppQ1xDEvvXRfofaQR3PUVuUNXo/jY9DPsoaq8zndTem8DG1PJhvCiUhg6iPh8UZeqe3t4LSh43E040S+Zos1/cmooiUuSyvkZKKn1ZqmIGbkBysvCxM0rxZHpPEX+xNeaJcJsUOkFOYjMiONHCtr0gHFoOF2UYo0RulcJg99G8P2SSJd8ca5YwQotM79sL1/Wgo4xFMTklpF/3hPLcrouoqXCIGtKcV7NzGDyk/BOe+8W72zvfKUBwHKfHSppnGV+LBJ7Mg/WVFnLnpbhsYANm0YDCnjKpj6do6wVD2ErhwzISs7JrdG/hV1e4yYFkC5Vo8JfEnGBOztNdfj0DquMf5UH3n//n2FuLESs/pH4W7TmJNvdCh5pE+obNamesjVXY7F88Xk8XJEbWnPEtnIr5C2i11uUke/CD+iX2n8cErJ+IAgGy8ZyUUGgksRGSsJWf0NtomJio7SHSvN4S8siaYqrKDkOpijYZE9sunfT5PqTm8KwQV17NAwBJ87qhaa8x2/KBbEFy5Br8rhdbReyzDrEmKQUGJ7TE8AlWSuVBRmC+w48hZS1Lf2WoLbg5Y0//ZwqeM1xRvLJKQgR+7SipPM20TNAm487HXj/u1bQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf4314e4-bd63-47ef-5cc0-08de23a6b678 X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2025 17:53:26.6717 (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: 20Rzfs4oZ4D9q2fEPaz6s6JDpnIQ26/YYHMoyco40Agn+aGZ7k49tW8keq1V8S/mpoUvkkZh313pNDTQbaOdvLWyZHJqvhP+XV0ZNmK5DvU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6756 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-14_05,2025-11-13_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2510240000 definitions=main-2511140144 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTEzMDE3OCBTYWx0ZWRfX9E4CjBqd7GIt zkONP4AjX4tSjiJrLY97u96sxt2lU0xr+AwwLfy7UBJbjYAiwB4snAWbLBqQm3h+Q/MQfZtNI07 kcRdhRaUXbGi2gNE0lNVv1Pcdpphq5Ef7/d4EJ+FFrOL76Xyx5K0kZVlq4RLRqV8A3VSa3fo8qF QrY9ZYmEJr5F15YVTY03HILxsKrJIFhbR/n4tAZ35ZukAmTwSRi0An1ge8s5csJNRJwnY4tv8yn qH6eI5xh9xPGoZQy9++M44spSVbXSBnrtQGUej9jd3ea4L91LnsISwGMH35sZ+2H2oavjtVUbL0 C9rL1Y/v8H9/nIrDx806AnNO0bPNbR2Oyt7xDN91byW3l263Mf1Buw7lAO9EgB1+Ff9kMcjMYcp ATk/pmLFAIfSiU0gFqcP2VQlL0xXb/s2OVCls23QDrvh0xecEOo= X-Authority-Analysis: v=2.4 cv=WuYm8Nfv c=1 sm=1 tr=0 ts=69176c9a b=1 cx=c_pps a=qoll8+KPOyaMroiJ2sR5sw==:117 a=qoll8+KPOyaMroiJ2sR5sw==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=6UeiqGixMTsA:10 a=GoEa3M9JfhUA:10 a=VkNPw1HP01LnGYTKEx00:22 a=yPCof4ZbAAAA:8 a=Q1rnGyXiy6mPtF9hYIQA:9 cc=ntf awl=host:12099 X-Proofpoint-GUID: 3nUZ65-lzW4aOfDWTSARSY5UASMo1h48 X-Proofpoint-ORIG-GUID: 3nUZ65-lzW4aOfDWTSARSY5UASMo1h48 Content-Type: text/plain; charset="utf-8" Currently we set VM_SOFTDIRTY when a new mapping is set up (whether by establishing a new VMA, or via merge) as implemented in __mmap_complete() and do_brk_flags(). However, when performing a merge of existing mappings such as when performing mprotect(), we may lose the VM_SOFTDIRTY flag. This is because currently we simply ignore VM_SOFTDIRTY for the purposes of merge, so one VMA may possess the flag and another not, and whichever happens to be the target VMA will be the one upon which the merge is performed which may or may not have VM_SOFTDIRTY set. Now we have the concept of 'sticky' VMA flags, let's make VM_SOFTDIRTY one which solves this issue. Additionally update VMA userland tests to propagate changes. Suggested-by: Vlastimil Babka Signed-off-by: Lorenzo Stoakes Acked-by: David Hildenbrand (Red Hat) Reviewed-by: Liam R. Howlett Reviewed-by: Pedro Falcato --- include/linux/mm.h | 23 +++++++++++------------ tools/testing/vma/vma_internal.h | 23 +++++++++++------------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 43eec43da66a..fd9eeff07eb5 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -532,29 +532,28 @@ extern unsigned int kobjsize(const void *objp); * possesses it but the other does not, the merged VMA should nonetheless = have * applied to it: * + * VM_SOFTDIRTY - if a VMA is marked soft-dirty, that is has not had its + * references cleared via /proc/$pid/clear_refs, any merg= ed VMA + * should be considered soft-dirty also as it operates at= a VMA + * granularity. + * * VM_MAYBE_GUARD - If a VMA may have guard regions in place it implies th= at * mapped page tables may contain metadata not described = by the * VMA and thus any merged VMA may also contain this meta= data, * and thus we must make this flag sticky. */ -#define VM_STICKY VM_MAYBE_GUARD +#define VM_STICKY (VM_SOFTDIRTY | VM_MAYBE_GUARD) =20 /* * VMA flags we ignore for the purposes of merge, i.e. one VMA possessing = one * of these flags and the other not does not preclude a merge. * - * VM_SOFTDIRTY - Should not prevent from VMA merging, if we match the fla= gs but - * dirty bit -- the caller should mark merged VMA as dirty.= If - * dirty bit won't be excluded from comparison, we increase - * pressure on the memory system forcing the kernel to gene= rate - * new VMAs when old one could be extended instead. - * - * VM_STICKY - If one VMA has flags which most be 'sticky', that is ones - * which should propagate to all VMAs, but the other does n= ot, - * the merge should still proceed with the merge logic appl= ying - * sticky flags to the final VMA. + * VM_STICKY - If one VMA has flags which most be 'sticky', that is ones + * which should propagate to all VMAs, but the other does not, + * the merge should still proceed with the merge logic applying + * sticky flags to the final VMA. */ -#define VM_IGNORE_MERGE (VM_SOFTDIRTY | VM_STICKY) +#define VM_IGNORE_MERGE VM_STICKY =20 /* * Flags which should result in page tables being copied on fork. These are diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_inter= nal.h index bd6352a5f24d..10f46a95a73a 100644 --- a/tools/testing/vma/vma_internal.h +++ b/tools/testing/vma/vma_internal.h @@ -122,29 +122,28 @@ extern unsigned long dac_mmap_min_addr; * possesses it but the other does not, the merged VMA should nonetheless = have * applied to it: * + * VM_SOFTDIRTY - if a VMA is marked soft-dirty, that is has not had its + * references cleared via /proc/$pid/clear_refs, any merg= ed VMA + * should be considered soft-dirty also as it operates at= a VMA + * granularity. + * * VM_MAYBE_GUARD - If a VMA may have guard regions in place it implies th= at * mapped page tables may contain metadata not described = by the * VMA and thus any merged VMA may also contain this meta= data, * and thus we must make this flag sticky. */ -#define VM_STICKY VM_MAYBE_GUARD +#define VM_STICKY (VM_SOFTDIRTY | VM_MAYBE_GUARD) =20 /* * VMA flags we ignore for the purposes of merge, i.e. one VMA possessing = one * of these flags and the other not does not preclude a merge. * - * VM_SOFTDIRTY - Should not prevent from VMA merging, if we match the fla= gs but - * dirty bit -- the caller should mark merged VMA as dirty.= If - * dirty bit won't be excluded from comparison, we increase - * pressure on the memory system forcing the kernel to gene= rate - * new VMAs when old one could be extended instead. - * - * VM_STICKY - If one VMA has flags which most be 'sticky', that is ones - * which should propagate to all VMAs, but the other does n= ot, - * the merge should still proceed with the merge logic appl= ying - * sticky flags to the final VMA. + * VM_STICKY - If one VMA has flags which most be 'sticky', that is ones + * which should propagate to all VMAs, but the other does not, + * the merge should still proceed with the merge logic applying + * sticky flags to the final VMA. */ -#define VM_IGNORE_MERGE (VM_SOFTDIRTY | VM_STICKY) +#define VM_IGNORE_MERGE VM_STICKY =20 /* * Flags which should result in page tables being copied on fork. These are --=20 2.51.0