From mboxrd@z Thu Jan 1 00:00:00 1970 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 4D004C433EF for ; Tue, 25 Jan 2022 13:23:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AADA86B007B; Tue, 25 Jan 2022 08:23:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A5BBD6B007D; Tue, 25 Jan 2022 08:23:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94B866B0080; Tue, 25 Jan 2022 08:23:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 871466B007B for ; Tue, 25 Jan 2022 08:23:43 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3FD9494FB4 for ; Tue, 25 Jan 2022 13:23:43 +0000 (UTC) X-FDA: 79068876726.10.524FA91 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 0B3734005C for ; Tue, 25 Jan 2022 13:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UrK514UwF7QVluUkWuRFhQwwmGxmvVhhk2lt7oj702M=; b=XSbVNORCErQnwSumGnb8HvmKD8 pLWzdfWlODLIp+5VcWGtg6HTU/QpFXIxNJ9lUdpnRoqDkaCP7x8jw1UGE+NhPx+yfM7+2+kmoXKzT P48S3Z8HzmlRjl0l+gDg1dqlZJ/C3P96esPtNNMNc56VJOFg7/Uhz34LsoogYRumFdZ5nWxJADYFS v4M7PEqXizoIWgKC0e7SkP5hKthTikmE2Ft7OwRoc0UNyf6GoovnaysflQbLZO4ZefovZT+qSPl7O SG6/Fd89ihN+OE544mX2cWLGvOnUdmm2vGkQz1KmMYRHctjz0TqvMJM2PkhzOOaTyOQYJUqUqdvQp +1cleJDg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCLn7-002q4B-S9; Tue, 25 Jan 2022 13:23:22 +0000 Date: Tue, 25 Jan 2022 13:23:21 +0000 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Khalid Aziz , akpm@linux-foundation.org, longpeng2@huawei.com, arnd@arndb.de, dave.hansen@linux.intel.com, david@redhat.com, rppt@kernel.org, surenb@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 0/6] Add support for shared PTEs across processes Message-ID: References: <20220125114212.ks2qtncaahi6foan@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220125114212.ks2qtncaahi6foan@box.shutemov.name> X-Stat-Signature: j3d9isnhtnj1fhx5p83iun8t8jzgu6x4 X-Rspam-User: nil Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=XSbVNORC; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 0B3734005C X-HE-Tag: 1643117021-484493 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: On Tue, Jan 25, 2022 at 02:42:12PM +0300, Kirill A. Shutemov wrote: > I wounder if we can get away with zero-API here: we can transparently > create/use shared page tables for any inode on mmap(MAP_SHARED) as long as > size and alignment is sutiable. Page tables will be linked to the inode > and will be freed when the last of such mapping will go away. I don't see > a need in new syscalls of flags to existing one. That's how HugeTLBfs works today, right? Would you want that mechanism hoisted into the real MM? Because my plan was the opposite -- remove it from the shadow MM once mshare() is established.