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 X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10A93C433E0 for ; Thu, 21 Jan 2021 22:38:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C728623A62 for ; Thu, 21 Jan 2021 22:38:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726147AbhAUWim (ORCPT ); Thu, 21 Jan 2021 17:38:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46550 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbhAUWik (ORCPT ); Thu, 21 Jan 2021 17:38:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611268630; 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: in-reply-to:in-reply-to:references:references; bh=9F4FJm6CxPIzCDPXLeRl1F1UfXVZJLDgPR0BedATtNQ=; b=WvI0jJGWbDR71kyxqxL2An+ohd+4t40Vi0PjaNr354TaDAWAB0V2xB2jniEbQxNJ9ZzQzF kqSjSqYaOsQBRFVo2aeQSsjDgL6yNtF4nbrClbucHj5nK8zkdRGKfTNNvuee+4qCaAnqTa vNFarP7XQ6CQgOAJOEcjRJ5XJnVjTMw= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-04Bu4nzbNMa1MjU6DqsTrQ-1; Thu, 21 Jan 2021 17:37:07 -0500 X-MC-Unique: 04Bu4nzbNMa1MjU6DqsTrQ-1 Received: by mail-qv1-f70.google.com with SMTP id dj13so1495154qvb.20 for ; Thu, 21 Jan 2021 14:37:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9F4FJm6CxPIzCDPXLeRl1F1UfXVZJLDgPR0BedATtNQ=; b=cABEHyppjXWYxtdRcwT7c3waBNC2On4OmbrImpivOhx8T7GGitO67/dMbrgsfdnQvY X7rxcooCGZY7MSXfrp3Y/qoc8tNJ6keOg43KUBNdldFWkdIJ7H7PoZKsJtOvWg8ARLz+ FgXOFg5+F+iEK7bsSc0TNMZCdWkxtJ7/vE75QAqVs2qci8BLBRZ0lzqi6Ie+eXVtiG39 3GKktgu4PAZnblwUAek6GjKzM2XG0N/Q2IbGbhi9PMAyF3WTkeP6uzaw6Ry6xQ56B7AB vM4duCM11Wyn+Gdu9TaOT4EEu8aAFjqij3Y8pOzAaIafxFNJUcPPo4nUKCPjbb1e61HR iH7g== X-Gm-Message-State: AOAM533PdUtjiR5OP7cAOM+FTSYpkdrRzbbrYN/QRc7OOBeZwGB+iWOA 6FgKbul4OMsh0tmwcr1qe9mXiU6ivBrdDaG9O9vR92qRfA+i+rve/MqRqo3P7EtO3nTYHqcX3sx aUlaqxHP3ZmyOM5d9TvEtFicKjQ== X-Received: by 2002:ac8:7a82:: with SMTP id x2mr1902822qtr.20.1611268626717; Thu, 21 Jan 2021 14:37:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzF3+w++uI/FnvKRDlQcHOvwzcsjyp5Q8slh4ec0gAIH6IQXOf+SKAUhSC7Vg50ypEzJuOuDQ== X-Received: by 2002:ac8:7a82:: with SMTP id x2mr1902784qtr.20.1611268626438; Thu, 21 Jan 2021 14:37:06 -0800 (PST) Received: from xz-x1 ([142.126.83.202]) by smtp.gmail.com with ESMTPSA id 203sm4955384qkd.81.2021.01.21.14.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 14:37:05 -0800 (PST) Date: Thu, 21 Jan 2021 17:37:03 -0500 From: Peter Xu To: Axel Rasmussen Cc: Alexander Viro , Alexey Dobriyan , Andrea Arcangeli , Andrew Morton , Anshuman Khandual , Catalin Marinas , Chinwen Chang , Huang Ying , Ingo Molnar , Jann Horn , Jerome Glisse , Lokesh Gidra , "Matthew Wilcox (Oracle)" , Michael Ellerman , Michal =?utf-8?Q?Koutn=C3=BD?= , Michel Lespinasse , Mike Kravetz , Mike Rapoport , Nicholas Piggin , Shaohua Li , Shawn Anastasio , Steven Rostedt , Steven Price , Vlastimil Babka , LKML , linux-fsdevel@vger.kernel.org, Linux MM , Adam Ruprecht , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Oliver Upton Subject: Re: [PATCH 0/9] userfaultfd: add minor fault handling Message-ID: <20210121223703.GH260413@xz-x1> References: <20210115190451.3135416-1-axelrasmussen@google.com> <20210121191241.GG260413@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jan 21, 2021 at 02:13:50PM -0800, Axel Rasmussen wrote: > When I wrote this, my thinking was that users of this feature would > have two mappings, one of which is not UFFD registered at all. So, to > replace the existing page contents, userspace would just write to the > non-UFFD mapping (with memcpy() or whatever else, or we could get > fancy and imagine using some RDMA technology to copy the page over the > network from the live migration source directly in place). After > performing the write, we just UFFDIO_CONTINUE. > > I believe FALLOC_FL_PUNCH_HOLE / MADV_REMOVE doesn't work with > hugetlbfs? Once shmem support is implemented, I would expect > FALLOC_FL_PUNCH_HOLE + UFFDIO_COPY to work, but I wonder if such an > operation would be more expensive than just copying using the other > side of the shared mapping? IIUC hugetlb supports that (hugetlbfs_punch_hole()). But I agree with you on what you said should be good enough. Thanks, -- Peter Xu