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 715F1C28CF5 for ; Wed, 26 Jan 2022 14:30:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D37736B0075; Wed, 26 Jan 2022 09:30:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CE6476B0078; Wed, 26 Jan 2022 09:30:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B5FA76B007B; Wed, 26 Jan 2022 09:30:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id A6B5F6B0075 for ; Wed, 26 Jan 2022 09:30:14 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5F10A8248D52 for ; Wed, 26 Jan 2022 14:30:14 +0000 (UTC) X-FDA: 79072673148.25.3EAF822 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf15.hostedemail.com (Postfix) with ESMTP id CE25EA0008 for ; Wed, 26 Jan 2022 14:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643207413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=150fjVbAwE7w6KLDZgSC6nZJBEmTmA9CuvCHqdto7BQ=; b=fPyS68kW/cKKvFCC5Uj0XxW+A27aSQXFcEuV2GB3LvExNHhXpgEFmI7YoZ/jhbTcdEGZ/u A3xT9nvpuuJhr4u8qtVpeck1bN/DWtj6XyGpaMTvKSBCmdK8UYaSHRZYtyTn2YF35ZLCpb gSjB0fOq9gkz+ybcZzFKY9Af3qQfCoA= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-217-ki-2oXf_PjyuHUt2soG_6A-1; Wed, 26 Jan 2022 09:30:11 -0500 X-MC-Unique: ki-2oXf_PjyuHUt2soG_6A-1 Received: by mail-wm1-f71.google.com with SMTP id m3-20020a7bcb83000000b0034f75d92f27so3385374wmi.2 for ; Wed, 26 Jan 2022 06:30:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=150fjVbAwE7w6KLDZgSC6nZJBEmTmA9CuvCHqdto7BQ=; b=Au9oFwo7RkhPxNkzqBuscOhY8xt76xIydMKUAtl6YuSNGcct6tvPtBqJOxdvKaVRUn soUN/ylpkZBwDs7ENvnRPKWzkAMz6JTezbMXA4Zhvkvfc+OImf+hSez8XRgNwvJ+o9L6 L4ujbHfSTg0EX8Hy08WNvMFE1YyAjNA5UNM+MnzxtiWT6pmjigtPNfPl3wWp6QxxjV5/ rwYQ3qj/HuQfe0xECsanlaPW9nBmX/jvoAECbpi0OU8fyocqaVle2qUxW4tvSO6F5pXg Yn6bh6J6a/hw15YEb9hjF5Hqbrr+lwHZUf0NTRNYToLND64qGsmErQIevvODCk2DsQpQ Y6Qw== X-Gm-Message-State: AOAM532gSxot+MRSlQSYqhtjAmLM/Z1SjpiJYGv3S+uB2HeQ4upm1+yR 9LwVPVMReDVmRsPMlwXuwzn0GFYwHJzzlJ4xlDRLmydPUCgkYF77Skgg7ViCfhkIeeijXyX0ZRN IfHtDy7/VVJ8= X-Received: by 2002:a05:6000:50b:: with SMTP id a11mr21795292wrf.387.1643207410676; Wed, 26 Jan 2022 06:30:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwc7scJK8kzvq+kw8xhyBTNOK9A0YqpOZbYNVnvSQ4zvC3C9EcQz4YQaKEfIScHQ6NWRTikNw== X-Received: by 2002:a05:6000:50b:: with SMTP id a11mr21795278wrf.387.1643207410449; Wed, 26 Jan 2022 06:30:10 -0800 (PST) Received: from ?IPV6:2003:cb:c709:2700:cdd8:dcb0:2a69:8783? (p200300cbc7092700cdd8dcb02a698783.dip0.t-ipconnect.de. [2003:cb:c709:2700:cdd8:dcb0:2a69:8783]) by smtp.gmail.com with ESMTPSA id m187sm3201648wme.25.2022.01.26.06.30.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jan 2022 06:30:09 -0800 (PST) Message-ID: Date: Wed, 26 Jan 2022 15:30:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [RFC PATCH 0/6] Add support for shared PTEs across processes To: Matthew Wilcox 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 References: <20220125114212.ks2qtncaahi6foan@box.shutemov.name> <20220125135917.ezi6itozrchsdcxg@box.shutemov.name> <20220125185705.wf7p2l77vggipfry@box.shutemov.name> <2190b8e2-74f2-0e31-0a40-0401fbd9966e@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: nil X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: CE25EA0008 X-Stat-Signature: if6bwsxfwuqc718gocnw37cnkr34wrkt Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=fPyS68kW; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf15.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-HE-Tag: 1643207413-319377 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000276, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 26.01.22 15:12, Matthew Wilcox wrote: > 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. I don't speak "filesystem" fluently, but I assume that could be an overlay over other fs? Peter is currently upstreaming uffd-wp for shmem. How could that look like when doing it the fs-way? -- Thanks, David / dhildenb