Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5500052pxb; Wed, 26 Jan 2022 13:30:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2K5wG4OuR5X6JM3KppQ8PXunL47fuEmvviA8J21Qt2d4RwDYC9PJdIk2uAhWdsMjFtiF7 X-Received: by 2002:aa7:95b2:: with SMTP id a18mr320127pfk.39.1643232630258; Wed, 26 Jan 2022 13:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643232630; cv=none; d=google.com; s=arc-20160816; b=Pr8D32dxP1h2bcDxA1/WVnvYsybcsCk3Ln3dJ3SaZF6qUqluckMp5eO+KUuvBQCGJZ 11GH1vWQlbGre6pLHDkMkkimPnaYfdYsFOqopxXQ2rk5/J2yKE2G4Vd159X4nz55WeVm pqHVNc9TItNbVy7BZ4gX+G3j+SNP/XUM/hTwxT2m2Cg+1IPqYgFKlNHgGCFYSpu/CYp6 /8kQ4Ii5pB4ox5Onvp57AG8QAHzwNABgOwfK/nF4S0L6/sKK1vjpCGlIHSsmpCtd3MAi CscaEmayxulmSA3Ye3OCEykXhDOT4cV86YFUFlESxcKiZgR9ZlLAoiF1SEcyzBw+vGDz 1rDw== 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=vqA7CRwSHoOR/tJOQAe06dY8ic7ejbAv2r4e+k8PLFc=; b=czJzGxQX7wd/LzIp+WmFncZRkt9fZz5qow8jLk7UFN47XeYkC+GMItgLcbMBABmuV8 f4/jhTIzU9JWydRvxM2bZ3xKN9XeIVNjwo9H33aZnzBfi5XXJX6S+Sf10NmIuDImJukZ Ad9K8zGwD2ZEWBsCzoq7aBgAWaszvSrHMvAzay1IC+WiUMKxWYmoO+FbJcyrBTLPkDee YyqrQW2o2SP6TukbODhQtaPaakwHfPGxNHQ0Y+yEB7txkn3/NXQ3TLAkTK8Py/ADIizv exzFm5rlXawICNX0JG2oMTamodfI1oVVx318weCYydmkbOpR+eX5chfcR1RNyOpif512 VV3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tZQcPh5g; 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 t64si309204pgd.769.2022.01.26.13.30.18; Wed, 26 Jan 2022 13:30:30 -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=tZQcPh5g; 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 S241952AbiAZONL (ORCPT + 99 others); Wed, 26 Jan 2022 09:13:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232541AbiAZONJ (ORCPT ); Wed, 26 Jan 2022 09:13:09 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5134C06161C for ; Wed, 26 Jan 2022 06:13:09 -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=vqA7CRwSHoOR/tJOQAe06dY8ic7ejbAv2r4e+k8PLFc=; b=tZQcPh5gvqStAJ6jA0YK2t01Sw GehlWy5GlMlaFzXz0gV3+mTxYwQyZX1lWoTkRSjXVXi8IJkQS56IY0nKcTEi1Lha3CW6ziroThbE5 fz8ZwPPj3d8iTtCawn1tdgkrtZubbb6QICbvfBoxwVjag1JYveRZ8Hk3HRbbfG1gWsM/IHvD6mtKf R/r44YROsqckqzmHGMQ/cybYNNdboamluoJtS7g84BqZ/IkQM3S81AHaS8QRSKKaC5erwk7J1dKYt FvB9p2rvqG/+Y/fkR8DjGN+3zRqo9I2kFhds9syMmemMoy6cWlpv0XI22QJ5Kegg/zjpnaRzWfL5s wx1AlItw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCj2Z-0046kL-Ax; Wed, 26 Jan 2022 14:12:51 +0000 Date: Wed, 26 Jan 2022 14:12:51 +0000 From: Matthew Wilcox To: David Hildenbrand Cc: "Kirill A. Shutemov" , Khalid Aziz , akpm@linux-foundation.org, longpeng2@huawei.com, arnd@arndb.de, dave.hansen@linux.intel.com, rppt@kernel.org, surenb@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Xu Subject: Re: [RFC PATCH 0/6] Add support for shared PTEs across processes Message-ID: References: <20220125114212.ks2qtncaahi6foan@box.shutemov.name> <20220125135917.ezi6itozrchsdcxg@box.shutemov.name> <20220125185705.wf7p2l77vggipfry@box.shutemov.name> <2190b8e2-74f2-0e31-0a40-0401fbd9966e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2190b8e2-74f2-0e31-0a40-0401fbd9966e@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 02:55:10PM +0100, David Hildenbrand wrote: > On 26.01.22 14:38, Matthew Wilcox wrote: > > On Wed, Jan 26, 2022 at 11:16:42AM +0100, David Hildenbrand wrote: > >> A while ago I talked with Peter about an extended uffd (here: WP) > >> mechanism that would work on fds instead of the process address space. > > > > As far as I can tell, uffd is a grotesque hack that exists to work around > > the poor choice to use anonymous memory instead of file-backed memory > > in kvm. Every time I see somebody mention it, I feel pain. > > > > I might be missing something important, because KVM can deal with > file-back memory just fine and uffd is used heavily outside of hypervisors. > > I'd love to learn how to handle what ordinary uffd (handle > missing/unpopulated pages) and uffd-wp (handle write access to pages) > can do with files instead. Because if something like that already > exists, it would be precisely what I am talking about. Every notification that uffd wants already exists as a notification to the underlying filesystem. Something like a uffdfs [1] would be able to do everything that uffd does without adding extra crap all over the MM. [1] acronyms are bad, mmmkay?