Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4490515pxb; Tue, 25 Jan 2022 11:27:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLF+IUfZSObAr24CALEeorSh2LeWvjdZ8rEk+mW4WJpyHQJ7OHXUw1iia0xXB7zvdNs+ka X-Received: by 2002:a17:907:6d9d:: with SMTP id sb29mr15356548ejc.455.1643138851388; Tue, 25 Jan 2022 11:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643138851; cv=none; d=google.com; s=arc-20160816; b=I6M7eAmtps4AC3HQgK83hRRaM4rafcQpCZqcddaAhn4sQkboJ5BqGfwdGV3fUW198s zgliWG/Cfp2zYxfdQQMbgXw8jNcBFTFhfmTzgagrXmsRJpPe6l/J+PGXaHKpSgSl8Hq7 fWGhMC52pevBV3Q3uqhjoTCElv3bHuJYwRqy9lru25i829JuCV1Q221aySqrApYOWBkF hh2+iEGA64VEThiQN+9TUlm7A9KMgPF4ZD4h6GwaIhOkyR5R5F/28HN08Px9q9ZvEGUe AjsSmW9VK4+gRPBfIg4KflsdmK/CKBu9UysJyd8/aj1gUm+IS+TTKAoJzd2/FdFh/rtr l35g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UrK514UwF7QVluUkWuRFhQwwmGxmvVhhk2lt7oj702M=; b=z425vUBUsFCmnsvZ770C+xYN8FFgajZaBYMwz702qVxIf14XLl7XqGZe7AOdw3toOp CWvXuPbLc/yl8NujSc8seWVn59B/j08rK2w8LKcWQkr5pp3uWxJbOlUL7XcCCxcvSlh3 zQdBD5/DfWwcbcDrZbeqBqtZs2RPVV+JOtb9cxOqdSXOfw73HZuUNd4OYHgSOJ93/aFe 4hOsInvMRz2flSp7AJG2mL5dmgSdM5F0e1Wu6HErt61qn1ApUFnKEMtm/0if7cu3V9xs D71ywKM+QF+QZkOAHpvPdjM2h9FsL8lF5rRt2cuu9Nx1cZgRSX8tCzLslDwqMR8Ibwib 9c2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XSbVNORC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn24si10336953edb.565.2022.01.25.11.27.06; Tue, 25 Jan 2022 11:27:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XSbVNORC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1577016AbiAYN1y (ORCPT + 99 others); Tue, 25 Jan 2022 08:27:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1576594AbiAYNXn (ORCPT ); Tue, 25 Jan 2022 08:23:43 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F59AC061748 for ; Tue, 25 Jan 2022 05:23:39 -0800 (PST) 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.