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 DF332E81E03 for ; Fri, 6 Oct 2023 15:02:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4AC8B8D00C6; Fri, 6 Oct 2023 11:02:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 45CF98D0050; Fri, 6 Oct 2023 11:02:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2FD288D00C6; Fri, 6 Oct 2023 11:02:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 21C3E8D0050 for ; Fri, 6 Oct 2023 11:02:20 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E7E7B1604FF for ; Fri, 6 Oct 2023 15:02:19 +0000 (UTC) X-FDA: 81315352398.05.259C8DA Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) by imf07.hostedemail.com (Postfix) with ESMTP id 0AB5A40039 for ; Fri, 6 Oct 2023 15:02:16 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="ygxB1W/B"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of surenb@google.com designates 209.85.219.178 as permitted sender) smtp.mailfrom=surenb@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696604537; h=from:from:sender: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:dkim-signature; bh=LAT19evpcikftTKsU+k+vIv081WV5YPaM49e24ewPPI=; b=D2Tz/xf5rEHLlL6OmDL8CO8gIkhGt/JTHB7wF+KgBkAM0lUCxZrCEjSmTjcAtRcT69lveB WGh624+8QG1GbnhK+S96B4n6jYDqZiWPjkh/KRg6vllpmVB53v8vCICc4M5rGuOtJxQosM o7NbJL0iGpNZI48batN1P1DaDBxwgjk= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="ygxB1W/B"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of surenb@google.com designates 209.85.219.178 as permitted sender) smtp.mailfrom=surenb@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696604537; a=rsa-sha256; cv=none; b=tK3yP70MWyMaGtDRoMNawzZSHW6t7vF/ChBi0wfmbQsZHNJlyG+fxOpu5dVhuBCF80Jqss f4G2levuzrXIpcXEAWeamb8WeF0owOysgshEmg96zv4QbAGNbpMK2WG6x4NJ/1tafJl4ED 9UnxFLfASmH1WB9q+YDcqXa9ARUCmrY= Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-d8198ca891fso2450585276.1 for ; Fri, 06 Oct 2023 08:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696604536; x=1697209336; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LAT19evpcikftTKsU+k+vIv081WV5YPaM49e24ewPPI=; b=ygxB1W/BPySnJ1ToZKzBdeHoH/Jm5tKhO2TS++LSeyedCsV4IxaJCqkQEm02baXfh4 aEEGT77lvNMsXxVyqlROCAtFAgQs2FPDRfFjQtnx3eXrjG8WLCOryIF/eGruL2Ltbuuu NNjrXVGYHTp/57Fh45i1/ViFGWSEeyojZS3r9suhx5X2CXQrwNGxyC/wBugSpwZ+y2xY lwNUuQYoYOT0+Hrqek4g8jA05AfVlXGcq5Ub8UbUTABPKUhTUxM5GAYoVawLU+HYkmSI RtALQXGtk7mgRgmjBiRjIpTPYY9SQnyf+zYMfPPUEUmx5pFvaN9sLBKuNR8JWDXOyOb9 YO3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696604536; x=1697209336; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LAT19evpcikftTKsU+k+vIv081WV5YPaM49e24ewPPI=; b=A+nxLSdPmmZq6Wg4L2ZxeqQaeWIj1htfKOxneEftkdxnSR+Y2NwPmJr7RJUSXkUf39 J3CjfWEUfCsaU8ong4n1G7dUe3wyhLso+1vIqZ4M3EzxUW16WHN7avdbQhqjF2M3A4GJ ThOUjc63yDXG3LIPzzmZMWQhpDYYaDGazxfaYavKPNQySEpUe8QmLhVHeNzdB4LA51lZ wtolqszVGu4euOJwRcFeO4Ie5xA7fJ/zWn7LV4ySydQ/F2p9EEew7Rjzup+6WqfeoEHc 8wkLhLfWZTHVwZyxWq38aSopMcJMQljJDAdICwyf/EcY3udSQ2jPwC7ZU+KHGeOj8dUr pcrw== X-Gm-Message-State: AOJu0YwgfLCaOTTcRLgT991314PlcyFpIP/F7zx5f7u4o3OmF+uUZ4s+ MUB8I4vOsq73rB4HMy5FVbUXhuCyEmmcsd1+rNjySQ== X-Google-Smtp-Source: AGHT+IFc16xhVp7RXBOoHUgUXh2Eel8sH+b1CWij1+SWJckP+B2dpSf1BmXp+gx4YH2/SUifs++/hwpbDGqVTk5PnbI= X-Received: by 2002:a5b:807:0:b0:d81:6e88:7cb3 with SMTP id x7-20020a5b0807000000b00d816e887cb3mr7404835ybp.47.1696604534279; Fri, 06 Oct 2023 08:02:14 -0700 (PDT) MIME-Version: 1.0 References: <9434ef94-15e8-889c-0c31-3e875060a2f7@redhat.com> In-Reply-To: From: Suren Baghdasaryan Date: Fri, 6 Oct 2023 08:02:00 -0700 Message-ID: Subject: Re: [PATCH v2 2/3] userfaultfd: UFFDIO_REMAP uABI To: David Hildenbrand Cc: Lokesh Gidra , Peter Xu , Jann Horn , akpm@linux-foundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, hughd@google.com, mhocko@suse.com, axelrasmussen@google.com, rppt@kernel.org, willy@infradead.org, Liam.Howlett@oracle.com, zhangpeng362@huawei.com, bgeffon@google.com, kaleshsingh@google.com, ngeoffray@google.com, jdduke@google.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 0AB5A40039 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ehrjredc6wqs84ycqjfm743orccqumgn X-HE-Tag: 1696604536-487099 X-HE-Meta: U2FsdGVkX1/9pskUjEFvyp1vqRUJQ5CVFopLfP5EC+lVrzqiFLYigER+C3YddoJ8QbCteIGIzdl1ebbhXWu/k6MB9f/6krDkefPSoe7E17Ydq1yLPAKOFDC24/VbLiPvGmwb0TFFT1Oc0kp4fzIL+ZJPPNp4s1Mzu3L/5OynVIvkV1gXFxbINBdQ1eNz17hKHlILE8H+ja9Ap5s4NlkpjBif+z6XUgSKoucpvpgWCwHqCREuBq0ZWTwx5aiZA+4cDMZmojauANjiU/BwZd3mw2UaY2/o4qLhmU/FvIxjHoNtSx//qmi6LQl2zVLZCOmfMWTEp1VxoXo2VOJla/0BpgLxscoDSDWPuiJt5b3N66jpKKi6+GF34KueLvX9akog96qLlJxQZiTXZdJQlHriMw2bmJnqCQkZ1cnqYMLfm64pWVOiagiFfhuiV1tmjllDDYCQPZDwnjqLkiVhWr/yNpmktHIAGWN3AkugLCrsKU4TdPCPLrOY3p9tnwxh/llXDAAY/ju8QsG3Kmv31nADJSt013C65fhOnIwzB5yhNfMnuaK8YeO4kb5m7yR9htftCvegxZG+NBhSMFV1YnALfFNMbfT+kKNU8ERfdr/1R3ar9HO1Olq1DZtN6y7FvV64kJOsnX1tzYfN73HiiSVPRAuJPpUpHQpv+NM9JxaYN9juysTxLLYn95LdE9QW96FCT4u/3ScZ44dAd6a4OQrFU0AGs4NxnLa+ggvCNT1LLRJWsgDA2Pa2ug8JDptVw3/Hs2h/pfTVLW4w0daG5A83zA77p3Tv8oTZkpppez+LuUR289eP+N9ouyhAvSZPXdpqko0K2EIlG2PzMo+lnkSrFYJ3+6SKqJJODdq5Aygfd4tNfhRrUwjUf4PadFTz6EVYKqqXjq3WIg079B42D9SadjpyqRfBlirN88uiPV1sqT+CAJOKOap8ngANCFNZy5itX0kuwAOuipH9T8B6ZOR KTh7Kj8c 0NV2OWEP7gQMSWWqFZoEKXPbqXo4CUtxLTa4zMKrZozFb32z9rGjuqd+pkejbJGR/4LUQEp6GDwLQUoZEDEFTyZwq8Dxp4TneDqOLVqkgmcZKNtpSocIdQA4UqpIm019KFaov4MhUVUX6cqAyD/Sn+odOUNn2PCtWtk9M1Y/dHUbwA/9EW1J0BLirKObdWpq92R3GqgXBD5fy2CPKYxhwID7U/wxKQIS1fRwvXdkIk1o4sh52soLRmCaFB7NU3kRhocCh5M+bCxrAy7dIehwtEOWq6aEvh4dMnjECt2gDei59A4PusMdM28q0H/VuuPhROzBNKcUrdDI/foNsMvn/8t/Kmtiuk/JVp7z+ftlPfmLBoHMF70Xtf2Fbv0KM1Ib4bzfk X-Bogosity: Ham, tests=bogofilter, spamicity=0.018238, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Oct 6, 2023 at 5:30=E2=80=AFAM David Hildenbrand = wrote: > > On 04.10.23 01:39, Lokesh Gidra wrote: > > On Tue, Oct 3, 2023 at 11:26=E2=80=AFPM Suren Baghdasaryan wrote: > >> > >> On Tue, Oct 3, 2023 at 2:21=E2=80=AFPM Peter Xu wr= ote: > >>> > >>> On Tue, Oct 03, 2023 at 11:08:07PM +0200, David Hildenbrand wrote: > >>>> Sorry I have to ask: has this ever been discussed on the list? I don= 't see > >>>> any pointers. If not, then probably the number of people that know a= bout the > >>>> history can be counted with my two hands and that shouldn't be the b= asis for > >>>> making decisions. > >>> > >>> For example: > >>> > >>> https://lore.kernel.org/all/1425575884-2574-21-git-send-email-aarcang= e@redhat.com/ > > Sorry, I had to process a family NMI the last couple of days. > > >> > >> There was another submission in 2019: > >> https://lore.kernel.org/all/cover.1547251023.git.blake.caldwell@colora= do.edu/ > > It would be good to link them in the cover letter and shortly explain > why that wasn't merged back then (if there was any reason). Will do. I could not find the reason but will check again. > > >> > >> Though both times it did not generate much discussion. I don't have a > >> strong preference though MOVE sounds more generic to me TBH (it > >> specifies the operation rather than REMAP which hints on how that > >> operation is carried out). But again, I'm fine either way. > > > > That's a good point. IMHO, if in future we want to have the fallback > > implemented, then MOVE would be a more appropriate name than REMAP. > > > >> As for UFFDIO_MOVE_ZERO_COPY_ONLY vs UFFDIO_MOVE_MODE_ALLOW_COPY, I > >> find it weird that the default (the most efficient/desired) mode of > >> operation needs a flag. I would prefer to have no flag initially and > >> add UFFDIO_MOVE_MODE_ALLOW_COPY or whatever name is more appropriate > >> when/if we ever need it. Makes sense? > > > > Agreed! > > I agree. One could have UFFDIO_MOVE that is best-effort and documented > like that, and a to-be-named future extension that always works but > might be more expensive. > > > Ideally we'd have an interface that does not expose and/or rely on such > low-level information and simply always works, but getting that would > mean that we'd have to implement the fallback immediately ... so I guess > we'll have to expose a best-effort interface first. Sounds good. I'll try to post the next version early next week. Thanks for the input folks! > > -- > Cheers, > > David / dhildenb >