Message ID | 20250124235454.84587-11-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 1F604C02181 for <linux-mm@archiver.kernel.org>; Fri, 24 Jan 2025 23:56:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 987592800B7; Fri, 24 Jan 2025 18:55:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9371B2800B0; Fri, 24 Jan 2025 18:55:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7FF452800B7; Fri, 24 Jan 2025 18:55:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 60DEF2800B0 for <linux-mm@kvack.org>; Fri, 24 Jan 2025 18:55:54 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 225B6161A2F for <linux-mm@kvack.org>; Fri, 24 Jan 2025 23:55:54 +0000 (UTC) X-FDA: 83044005828.29.42C036E Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf27.hostedemail.com (Postfix) with ESMTP id 28B1D40008 for <linux-mm@kvack.org>; Fri, 24 Jan 2025 23:55:52 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=UXJrjoNs; spf=pass (imf27.hostedemail.com: domain of anthony.yznaga@oracle.com designates 205.220.177.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=1737762952; 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=/eSghHqoT5c0J4YzgWIiRZ+XGq6p2xYWtpvcjE+ANB4=; b=Z5tYnr3JBbpmY8s58JpeqwJczgsjJuVf5CwISXZ9UgSwLIIgL/oZz2J0mk17fFWspkwyTn POu0stdVgLEuYJvRLXX79lri0G46qmBFJPFkYh/RHhI/FFMsiQOvPOg+nYh4cmOEFCVZZb VHAxza1eYxCnEwrReF/9bBtxiDNAnnU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=UXJrjoNs; spf=pass (imf27.hostedemail.com: domain of anthony.yznaga@oracle.com designates 205.220.177.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=1737762952; a=rsa-sha256; cv=none; b=OynyAj2YAg5001uYEq9MJYY+ioEWeqkYnUoHEhgSoDOPtplPLmrXvDIQM+Lg+9kW7ZhSGP 3QhLjD8svMBqLtgmD0NipDLHLvFa2g08uo6T1+Q/ihgNm5Sj92Dja1NheyRYZl6dpHL5+K 5qEp1xjSeyUQYAdQHGZBsrxXi3A5UzY= 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 50OIvxBh022712; Fri, 24 Jan 2025 23:55:41 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=/eSgh HqoT5c0J4YzgWIiRZ+XGq6p2xYWtpvcjE+ANB4=; b=UXJrjoNsfNb4WKRHZ5xkw OEpw+EPE0TRIcETStVh274mVMU/ko8F9hL67gSxzr76IzNOQKPesaZEDIek7KNQo lTIOIiv8DRhEIC8wock9il8CVWN62KiAPGD112LB69JF6EcmZpHbQQyF4QZ7sbt1 rn3+NWx5FKLfy01BnPhLbUWAxq+AEdhO/sy850W6MLIBaCiVRDw2UNyvhIAR4ofG xbShQ0LMrZ4goJ6FKuRIenPA1Cszgvlb0tYwJtkOIhLiGfy5IkaK5OkK7mVGAx66 2lHmeqb8SHErOXUSAJy4e7cWQmBAGpn2IiZyZ7FthV6IG7ozjw+QWPoUmFjH8KS5 Q== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4485qm4y4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jan 2025 23:55:40 +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 50OLP7er036648; Fri, 24 Jan 2025 23:55:39 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 44917u4aer-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jan 2025 23:55:39 +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 50ONsxQ2018051; Fri, 24 Jan 2025 23:55:38 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-11; Fri, 24 Jan 2025 23:55:38 +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 10/20] mm: add mmap_read_lock_killable_nested() Date: Fri, 24 Jan 2025 15:54:44 -0800 Message-ID: <20250124235454.84587-11-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=825 bulkscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2501240162 X-Proofpoint-GUID: VWyly9zRQiKlVwOlv3-7fatJDdYAY01l X-Proofpoint-ORIG-GUID: VWyly9zRQiKlVwOlv3-7fatJDdYAY01l X-Rspamd-Queue-Id: 28B1D40008 X-Stat-Signature: 1ey88k1s5zmnrsxk54r7o99paxsct1sm X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1737762951-102975 X-HE-Meta: U2FsdGVkX1+bBmqsSVitumISI+HszwTFVATYb9fXKZ7MKL1CaGb+fiCrwzZ3iBxvJcUQm+3fh8Z803QzbrqtmBYlkezv39cujIlQEMON8DTUkbo5yLyoEZ3m3xJE7uadUvm2yDv3dvjIqH7FbdfG3/CnBm57kQMGCRxvyqyvzCPrhcPl2XgrFcZWzAMnSz0SmF1lSscSXF9U4CIipufHuW8VdVenqlMCie1PRolllmms57DwxGcMuQcocR/Hd7aMvzXCwM7ID0n1sF3VXYqLMzFPOU8A4mXMYOUwV8kCoHxWwN8eHjqiix6yHxjf0Sk8O8wr2sjE2Mt/Sc+25RCBl5wJTTTUIrJ90dzd8Iu+KrSdjJt92JD9tfZjl+RkQOw78Dx20sQ7rop8Izt+tpKtp/txiFVftiitsMoeN30msGhjsrgbq6GQVrRANqG3OLKzKiV7eJeMgMWr1GV9NhGXVfdwLSedNHQtyN5+PPp0zvIU0PLxHjhkKROK2S9JxNvGCkYoMeiOCW8ZVRcUjCvVk0ZNu1zZMNAv76tKC0yNdd7m+VfcI3AcULS1jH67ZYpxIhl25ppkN45uw51HUtCOC3JSQj4uTdYZZHYyJSLZgEIZFKnocbX7Iyz1n3aYabXA4xukqCFaM2OS4VsK6P+HyeGm0z+H0Yms0dmQn3MQTCqb/DBx8X+02BlOAM8xxfsyMxcYTTCn0jl7K5WSavv2sS7Pq/zcYuTZ1w6Jp00YskpHV+g3cgnXD+DWf6KpLUrt61yB8IFiDcbAJeMX4zrnbsTQTgGUZlvpwBjHPiSOi3gSbfjGjaFhQjLUUIQ1mBZfE1QAG5tg23IRpoYXBpNBNroJcRixEMb5683M6/zyOEoPZrjLIzxvtiHZEGYWqPP/r0TmJifDv0UI+39t4mB1mGAsnfGZg3MDKxr0MdmigYhaZjE7LJsYcKzuOzbVOz4CcnsJawXukmoygXhE+sO QJQjQC6c kRieWgyrecP+sFpgo5IWNusRyFa90B2DqeFRsVtN+aaogf0upNVc5EP/NSFknUFJxN9k5yIG7eAUOwronHgIif1jgoN/xGjMu44Fj3scpf6x/JRKF+5/Wo0hx+mL5HXmLXnBzjVns86Ril8zlG1FxZW8CmIHDsm6wsDQdvowU0ivqGLJ4id/r4/5vIpVDqyxHvKeJZbqeAbaPGCo73H0j+2dqi9Nl3yMlfJS7XpIzoYY44x9tLtihAaT8oyrNQO8Wk7mZXNsQXj7X2SVjkSSrjGwvlgCNao9DGxXR 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/mmap_lock.h b/include/linux/mmap_lock.h index 45a21faa3ff6..4671b4435d2a 100644 --- a/include/linux/mmap_lock.h +++ b/include/linux/mmap_lock.h @@ -191,6 +191,13 @@ static inline void mmap_read_lock(struct mm_struct *mm) __mmap_lock_trace_acquire_returned(mm, false, true); } +static inline void mmap_read_lock_nested(struct mm_struct *mm, int subclass) +{ + __mmap_lock_trace_start_locking(mm, false); + down_read_nested(&mm->mmap_lock, subclass); + __mmap_lock_trace_acquire_returned(mm, false, true); +} + static inline int mmap_read_lock_killable(struct mm_struct *mm) { int ret;
This will be used to support mshare functionality where the read lock on an mshare host mm is taken while holding the lock on a process mm. Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com> --- include/linux/mmap_lock.h | 7 +++++++ 1 file changed, 7 insertions(+)