Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp346554rdb; Fri, 6 Oct 2023 05:31:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMAD3+4rP2/nWMYvFFkqKgZj/FkuAwFGBU6j+5vWARbLUpzA4kNh0AmLXPt8b7M6OFeLOm X-Received: by 2002:a17:902:ecd1:b0:1c0:cbaf:6930 with SMTP id a17-20020a170902ecd100b001c0cbaf6930mr8559109plh.54.1696595501374; Fri, 06 Oct 2023 05:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696595501; cv=none; d=google.com; s=arc-20160816; b=Z/aQfZXPyfUWvPJQ0POwHP16nx7EE2iGmhbtA2UY/099TgYUssFJ+FRtWscXd38fdT 6VVxoH+FtnFvTKF9hKWxKTMwzJQqH82tguYvEUpNFpCielOGrrbVqAavGt7zKQol7P1L Btdzuo12wxttk9FYZvfRYQg24XbF1ebVI5fzPaUIn19ngA5zK9jiOE1v4NTkQVayfXRp PtR9noUKSeZz5LXPgs2w3/DCkXpLNOkHXxsO8qJ6cCYczjBSoAv5rovK03o7+/cHyoRd KVToihIb0hOrZu/ofOpgtRFhhnpAkn8vLnu7fZKbrJW+daK5RjWuXZCpTSL82A75dmAg dQSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :organization:from:references:cc:to:content-language:user-agent :mime-version:date:message-id:dkim-signature; bh=8It8tkqkVjlZ4hD1o0BfKil40eztbarnBcDIj9TIgRw=; fh=KC9kZdn9x5VcljnHYXUQuWaHXtoDsdt/RR9XVMbtfDs=; b=V/YBD1O3Fx2Iz+vkyXNX/+qeLDzjREg+R3yJm+Xoy/duPnEpxyZh1onC1ktPvdHH0n X6scvh1cua21ReiweLfpOT1Mhtqn13cKWPLPtbeBEASS7znS3yhGd5Ow8TRyixBv4UEJ 4BQhcd3V9EuD6/Mbm7Pk/9GydgjyylX9/yEBJY3EF0pjHtWPtHlu4Hon0BCDZxVK7qRu Rv47cG980XdRA09xOarMsUX/BMzWt1vEb+eckMYM1GLohfKLume1CO1pwvZN1c4W2Ty8 ctF38b60I5XvVIYgM5xsqGEOHK6MDcXAttuXHi7tSox/MwuCdIkZ5ienfxco3+KGpyFx WMXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AL9bsp/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ko5-20020a17090307c500b001c09d893c94si3407764plb.612.2023.10.06.05.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 05:31:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AL9bsp/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 39D468075008; Fri, 6 Oct 2023 05:31:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232029AbjJFMbJ (ORCPT + 99 others); Fri, 6 Oct 2023 08:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbjJFMbD (ORCPT ); Fri, 6 Oct 2023 08:31:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4FB133 for ; Fri, 6 Oct 2023 05:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696595411; 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=AL9bsp/99fpiM5GAJnm9dLb9vECeBmidViIy+eNTRYUecjJ8vdqF1pmRP75DC08GpV4SjG v22CdJwFE2mMKCcINJgwuYO08/hTKTZsz1Qq6GKR49WXWiOcSie9XFcT3s+QTCAPYjJAhF FtBEACJgy7GoGbVMEb6kHR5xGY4QEmY= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-ztQp0NJjMNmHwGdVdSPQXA-1; Fri, 06 Oct 2023 08:30:09 -0400 X-MC-Unique: ztQp0NJjMNmHwGdVdSPQXA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40570ccc497so15258445e9.3 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=jO1N6lA+j2N4Tcql37JkK19SgPxUQISRz/9X32/OELNCSITJO3Vi0SKHJjbH3uZSqF tK9R37KDep56kVrScPHVvUNxpJO2FnPMNRQNoajXPpq1XgtET17P+aBDvUM5PJijKlvI z/wPl1L/fY+9YG7d6//H+yrfCVE17I1SDRbT1N+lS89/+wOB3UOXF6w7Py5msc7s7EAu g3DanLqp8jldASmozgslXYIg7Zr6DFCNAVIzdPc1FCx06AkxSU5YeWdXceUnbBkSB2G+ yIheyAgsoLbOqVOicE0mJnD9FTRBOe5KhVEiuGzatJ0rlRd0dSxwzb9MfX/7rxhe269m lF9A== X-Gm-Message-State: AOJu0YwAQR4yu1e8jUWBRi74htG+uYI7XET6bRN4Pkwgw92zKdidtFDo SzYA27+V5ewlV30Is5xc6IAhWNU7EI6aRi6nYu/J94w6/s+6qSqCfKB0QGv3WDyLTfrz7LCPylQ j6GCUbxiNpbd4//YhP4YHAs7Y X-Received: by 2002:a5d:654e:0:b0:31d:db92:31ae with SMTP id z14-20020a5d654e000000b0031ddb9231aemr7724612wrv.44.1696595408361; Fri, 06 Oct 2023 05:30:08 -0700 (PDT) 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 Content-Language: en-US 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: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 05:31:38 -0700 (PDT) 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