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 DC309E81DE9 for ; Fri, 6 Oct 2023 12:30:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6FB298E001A; Fri, 6 Oct 2023 08:30:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 683818E000B; Fri, 6 Oct 2023 08:30:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D57D8E001A; Fri, 6 Oct 2023 08:30:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3B8638E000B for ; Fri, 6 Oct 2023 08:30:19 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 16D48B4B39 for ; Fri, 6 Oct 2023 12:30:19 +0000 (UTC) X-FDA: 81314969358.03.D2BA8C8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 96B3F4000F for ; Fri, 6 Oct 2023 12:30:16 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iDBExHaW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696595416; a=rsa-sha256; cv=none; b=NT4uQ0mrZIJoy2B5gB9k2a44o0Md0fXK6uaBja0DLJUNP8navVVWr/TjxTzfcz6t5nTQBY us4AIVNFfpS7zVfh+nMUAY3p3Wt5qaP8qDjMjBXLAap/lEm+EFbQXjj3dWDpEpCzmFQ05K v+83upKeSixK5PZb5jxIa2oLBfdQAiY= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iDBExHaW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696595416; 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=8It8tkqkVjlZ4hD1o0BfKil40eztbarnBcDIj9TIgRw=; b=SmR3JUf+D0nkCIx6PuwxrBH84GoWwrK5P86KsD63kJSF1hSqHq+MppOu9jsaR+xLLsY9rR JWbhyWRmGyWOV/thg/IEpIqkvnEaGzfOSKro7ICOHUAdv37CH/FnB3L9mNEzOEOvejnOH6 i4FvAYbc3QPzdT8BIr1lHusgLwtZV1U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696595415; 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=8It8tkqkVjlZ4hD1o0BfKil40eztbarnBcDIj9TIgRw=; b=iDBExHaWMCwM7cRuyegD5CZj6Bk/ZtnFu4dmqVuJKq6jIO4T4G1f+XLLzCUwy5CUimGoof Yojf/KaRCRZcgPdW9muXxawDUcRt4IhMyMsXPcnXD0G9GAxJRIhWjr4LLgQn9uygIsoyyx ryhAGx+yWT4k5vYTGJvmoKvFo6cNHXw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-erBPrRZxP-isMJzgjzZNhg-1; Fri, 06 Oct 2023 08:30:09 -0400 X-MC-Unique: erBPrRZxP-isMJzgjzZNhg-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-323306960e3so1362897f8f.1 for ; Fri, 06 Oct 2023 05:30:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696595408; x=1697200208; h=content-transfer-encoding:in-reply-to:subject:organization:from :references:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8It8tkqkVjlZ4hD1o0BfKil40eztbarnBcDIj9TIgRw=; b=Rx5lSzjBtDObY+03/kxpHASOL23a5MR1R54B4cEr6FRl/a2s7SyoNwetqIE9nCjc43 3cG0zXB50uVgYQ0NUrjoN5rFwh/TrDCMCmFIOLOpA9AC076vCaHP906ma+mP6SRT3X5b BGxZfXiayQ+zv0NQIyemXTcrVMEmCGeWutRhXYsa+Gscen+SsDR3ACnoYd1iufARgys7 9XT4JCAgOfexB9CiHZJoIp4CS88DvqcIbVHel3w+XBOQEbQXhMVn5jesC4GscbS9GuXs aqgGwrQePZwMKn6TdTGD9jDvXV4IXJfEIZtO3a3i5CuxSU0UfLmCxaLBOQZW0Sy2RFcr kEAA== X-Gm-Message-State: AOJu0YxS956RHXp2+I7sBkV8LfcjCJQvngRbo9RusB7izxA84cB6P68r e+oXFEo+T//F8rYYQR+K70oT6tHjBYhv9f9tezMjwmG+lqnqfnjzM3hVmBuxIR7QEfbmyYe3Baj SK9L97I237jk= X-Received: by 2002:a5d:654e:0:b0:31d:db92:31ae with SMTP id z14-20020a5d654e000000b0031ddb9231aemr7724616wrv.44.1696595408362; Fri, 06 Oct 2023 05:30:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPeDl/jbLTAu2J7xcFjLubeMat581zk8oYiD1AECauqAehKlE4r1vrKnp4LPajXvYKo35KQw== X-Received: by 2002:a5d:654e:0:b0:31d:db92:31ae with SMTP id z14-20020a5d654e000000b0031ddb9231aemr7724581wrv.44.1696595407844; Fri, 06 Oct 2023 05:30:07 -0700 (PDT) Received: from ?IPV6:2003:cb:c715:ee00:4e24:cf8e:3de0:8819? (p200300cbc715ee004e24cf8e3de08819.dip0.t-ipconnect.de. [2003:cb:c715:ee00:4e24:cf8e:3de0:8819]) by smtp.gmail.com with ESMTPSA id g7-20020a056000118700b003143c9beeaesm1559784wrx.44.2023.10.06.05.30.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Oct 2023 05:30:07 -0700 (PDT) Message-ID: Date: Fri, 6 Oct 2023 14:30:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 To: Lokesh Gidra , Suren Baghdasaryan Cc: 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 References: <9434ef94-15e8-889c-0c31-3e875060a2f7@redhat.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH v2 2/3] userfaultfd: UFFDIO_REMAP uABI In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rsp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q/SQVsa EAFCAaYGD2bYophPpYu8+3eWb1HIJAOcEJn7qetXAqHcGzgThZI9rSEWxuWo1Zfc3hWa6rJDoLUKVV7E7x0tvaHHW/fLCcwg0vMtY+OYYo5NmUaC8MgimWO09BqqH3/yYnTtTcz5mjTMJ0dxEnFE9P4/ldR6PseIdD7UOqv2pOHxhbxZiNsE4RURxrieT1Fl7ovGRtwilBUZmexVdYSHuY3KbegxpDCyHCycFe/1hsKHjdVwIh+kSLXyUVlNKQLwe09pNDxECrlbEAiHTQAG8xL0YbYAII0zRAbiPV09BrOxylBQKXYRywwMmW2gOiGgssE2HyeaNP/EIm1QPezJrQwrPi1JiwtfPST+cWfKYwESK34PNMZ/3QwyNBjapR3GNFq4GjNt/hOqrzyEZ5F5Vibh7NORG3pWW7oxb3m+Kl8JQgRb0ItTkdMSRznd4TkpbiDuh0XSzncT/CTFUmCcH6+jmWY7I9nusuJRtaGImJIPdLx9ka/VzUbaA1ReTSo3IFvgfX078V+x7nCLtz9S4aabLXGrKFd57/m/+ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 04.10.23 01:39, Lokesh Gidra wrote: > On Tue, Oct 3, 2023 at 11:26 PM Suren Baghdasaryan wrote: >> >> On Tue, Oct 3, 2023 at 2:21 PM Peter Xu wrote: >>> >>> 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 about the >>>> history can be counted with my two hands and that shouldn't be the basis for >>>> making decisions. >>> >>> For example: >>> >>> https://lore.kernel.org/all/1425575884-2574-21-git-send-email-aarcange@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@colorado.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). >> >> 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. -- Cheers, David / dhildenb