Message ID | 20250124235454.84587-19-anthony.yznaga@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 5E239C02181 for <linux-mm@archiver.kernel.org>; Fri, 24 Jan 2025 23:56:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DCF292800C0; Fri, 24 Jan 2025 18:56:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D7DFD2800B0; Fri, 24 Jan 2025 18:56:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF7BE2800C0; Fri, 24 Jan 2025 18:56:42 -0500 (EST) 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 9CD262800B0 for <linux-mm@kvack.org>; Fri, 24 Jan 2025 18:56:42 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5D6F0C19CC for <linux-mm@kvack.org>; Fri, 24 Jan 2025 23:56:42 +0000 (UTC) X-FDA: 83044007844.12.98BF574 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 3FF6D180009 for <linux-mm@kvack.org>; Fri, 24 Jan 2025 23:56:40 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=NBNz1vpN; spf=pass (imf16.hostedemail.com: domain of anthony.yznaga@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=anthony.yznaga@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737763000; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8uftArRhojvCPMIRnGj1x1yBh7nth+rSToT9QfbKQbE=; b=IaaIVet9Ok213tVpEcOL6OSP2TVQPc/fyXSZF7y1waIOUuftTe0+ETulvLJmfgOQVlSiH2 cii5PHDBivmfB2WW0fiEiM81uJGmyPV3rXyqqNn9K999ZyK64qwQrfnQ1koS54KGaE2bHu OWzd9fB84X4iVVd3y13LKRlsnZigdRw= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=NBNz1vpN; spf=pass (imf16.hostedemail.com: domain of anthony.yznaga@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=anthony.yznaga@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737763000; a=rsa-sha256; cv=none; b=umXZjH9VCqnlM4yL+N8SeOKKiAszbTnOVyjULjIvVEjvm3bhusE3iVMXRPDrPk6htghSAs jrQ4EdZ2HcPfkQYA5+NhnNb4JAfZGVG0QGOmRXmB1E9zImRv/CEKtOqMezk/8JkqyviYWl TQYFiPF43l9Qjd97C42j4s10maNk4sY= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50OIXg65000799; Fri, 24 Jan 2025 23:56:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2023-11-20; bh=8uftA rRhojvCPMIRnGj1x1yBh7nth+rSToT9QfbKQbE=; b=NBNz1vpNVG2DdlahpKAac mHO3DpyehCcOesPJsPnk36jiCZRFlXyz9Y8PTUI7Hnr4gFTFjbSxnZ8oKQoK/e3D YShuehhAQHh4kFuqiX6xE1Dt2E881mSqfHP3bmUwYsgQSJlS2PjaQJNVyT9/WOZS QqpVHaIbVebMBSuDVaH9otVoCtmhY/9pMaDlI/MuoyXFDkG/AksQjFluDgd4yr3H 8+3PIMBHFEW/B1nL1bh/H1xpLlGX5rDCDlAlZV6E6aC8MIJStkhyOxHe+pAt6ki5 1a1OSflAkFUO3oEeHVB/HBKm+9KteLBZVAsvfXVp3WGJZD8idzzQ1RJdlD0LU/Ak A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 44awyh5rkj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jan 2025 23:56:07 +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 50OLoFNH036500; Fri, 24 Jan 2025 23:56:06 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 44917u4ap1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jan 2025 23:56:06 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 50ONsxQI018051; Fri, 24 Jan 2025 23:56:05 GMT Received: from localhost.us.oracle.com (dhcp-10-65-130-174.vpn.oracle.com [10.65.130.174]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 44917u49ww-19; Fri, 24 Jan 2025 23:56:05 +0000 From: Anthony Yznaga <anthony.yznaga@oracle.com> To: akpm@linux-foundation.org, willy@infradead.org, markhemm@googlemail.com, viro@zeniv.linux.org.uk, david@redhat.com, khalid@kernel.org Cc: anthony.yznaga@oracle.com, jthoughton@google.com, corbet@lwn.net, dave.hansen@intel.com, kirill@shutemov.name, luto@kernel.org, brauner@kernel.org, arnd@arndb.de, ebiederm@xmission.com, catalin.marinas@arm.com, mingo@redhat.com, peterz@infradead.org, liam.howlett@oracle.com, lorenzo.stoakes@oracle.com, vbabka@suse.cz, jannh@google.com, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, tglx@linutronix.de, cgroups@vger.kernel.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhiramat@kernel.org, rostedt@goodmis.org, vasily.averin@linux.dev, xhao@linux.alibaba.com, pcc@google.com, neilb@suse.de, maz@kernel.org Subject: [PATCH 18/20] mm/mshare: provide a way to identify an mm as an mshare host mm Date: Fri, 24 Jan 2025 15:54:52 -0800 Message-ID: <20250124235454.84587-19-anthony.yznaga@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250124235454.84587-1-anthony.yznaga@oracle.com> References: <20250124235454.84587-1-anthony.yznaga@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-24_10,2025-01-23_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxscore=0 spamscore=0 mlxlogscore=924 bulkscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2501240162 X-Proofpoint-ORIG-GUID: seWEfcu2KQdw5VizmqhNebvh3voJaHP1 X-Proofpoint-GUID: seWEfcu2KQdw5VizmqhNebvh3voJaHP1 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 3FF6D180009 X-Stat-Signature: obnao6zwtozie5tq78g3taesjpai3qgd X-Rspam-User: X-HE-Tag: 1737763000-717328 X-HE-Meta: U2FsdGVkX1++XYQ9G6GFyonbJQEZp3r7JVJTruag0n1RMtVpviGe4mtHmt+pFtYBVikMEzLyOiMRPpURf5YfQepXCpZu8zmAfotqdRpuLQWO9pJ+g8LecOmyBP4Y2lLH9xBV1ts0IidxWkOgO6e5FVkmYnbbDQm77PX1GBYSAbh8ajn5W6gqnWjpYXoq5nGZ0aWcQ4KLiQnEk5+OKv/6oueyVFUbyOU3G12qiPAgqaolYM3e25oZ0c4EV3zi1kRr1SwfuDolNC1gV7cXIb297V94dnLS+WMQsPs1TBo1YMXxwJ2ip25DBvgeZXps2mv55RQV4hGDfmipSYw1Xh0fg4ap3lOLsQgEfXQjvrnPkFmTnZVHD96+Gy9GgQEhldf+joRsSCQznMCEbTyxK7Y0T6P/2Vt6wb6A+La/2McnY2NbZww+D0jU7QSzeIpFTemMq/lJZgPYrhUln41P327z+SdAyPwNXbS3JXNKuLL0YDoiqZ6s3sZTs6sQhT7XIqHsUW2DmA8Bllg9DjD/a9/Xv+5ebLbNXkE4mhaLyWhYxcVRnlyyeU/4aku/31aTl5Odfujbn+07Ij6hPhvwqI9eibouxCTPfhL/XN0pssvAkdcGzUl7Ss5uH3cy++8oLpeN7Qu6y8GnNlO0h/PFVz5usPlF6iqU+SsQ3mJJe9rDPLXKBEbVhnJoY60cdr50wPNvHxdGhYUrxmraXxGT7MiieQ0uOY/dBZcmTg+wszt+TaRNepNslj5C1hXQ3XSXsqw7PNa9pzJ3Kj/P1ny25160UrQH48Zk+PHTFpBmWMeLQ81iXjkEPV4SNwXJpfYtkGwI35F3+PHUwKAigDDEzER9ggCbRMSnRPVPo1M92td/L7az5mNh3F7EukeHwpqca1IPhg8fUc7TkEH6dH/ho+aHKaB5xLur5mf8j2KYAhZVqsi2l4E+Y1XDMQY86c7jEHrLnQ2O+XreAULnskCo8py cTRq4qzZ nEhYJO/n3GNZzUZOxSFUVbxjlajjtiuw+gvtJegeQjV3L8EMVsNNZ8beymdg7TDM8ohJFfK2Tsfayt2MI+rwyHhdmxFG/h9zIfPJyCGHvsYEvJsja1KQcu7XRlbu41IJ2b43GKH/IwLnUax2XxcP6lpcxaOMxIHvbJO4OLiFChsIi8LFuACJDJiYInXN4ofk/OXUvCrGgS4WqeSbc9FF9q9LLrz1v42EtwWapivwoXz0ReUIk0eNdARmULeWXv1RGi5tGnneV/hRhgY4= 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 |
Add support for shared PTEs across processes
|
expand
|
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 5f1b2dc788e2..dfbeb50e4c9b 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1642,6 +1642,8 @@ enum { #define MMF_TOPDOWN 31 /* mm searches top down by default */ #define MMF_TOPDOWN_MASK (1 << MMF_TOPDOWN) +#define MMF_MSHARE 32 /* mm is an mshare host mm */ + #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\ MMF_DISABLE_THP_MASK | MMF_HAS_MDWE_MASK |\ MMF_VM_MERGE_ANY_MASK | MMF_TOPDOWN_MASK) diff --git a/mm/mshare.c b/mm/mshare.c index 8f53b8132895..4c3f6c2410d6 100644 --- a/mm/mshare.c +++ b/mm/mshare.c @@ -365,6 +365,7 @@ msharefs_fill_mm(struct inode *inode) goto err_free; } + set_bit(MMF_MSHARE, &mm->flags); mm->mmap_base = mm->task_size = 0; m_data = kzalloc(sizeof(*m_data), GFP_KERNEL);
Add new mm flag, MMF_MSHARE. Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com> --- include/linux/mm_types.h | 2 ++ mm/mshare.c | 1 + 2 files changed, 3 insertions(+)