Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp590094rdb; Thu, 19 Oct 2023 13:03:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTCfUOZZy7mheK155Db/5gJRtbXiI+BeQCK6+QyzlUY5+NgdpNDHrtnalHTemr8+Kn9CDO X-Received: by 2002:aa7:9852:0:b0:68a:4bef:5f9a with SMTP id n18-20020aa79852000000b0068a4bef5f9amr2541040pfq.0.1697745795213; Thu, 19 Oct 2023 13:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697745795; cv=none; d=google.com; s=arc-20160816; b=qFgyUiCRaLi12AuqpmT6tLHuDgQkiE7QwVeXN404iEt/3835jginw/cwxwOyj5X9uv 8rh2giNExmLLGRo/OdT/D1kUgAFa3bVSNy0G3MtqVaiM5OSJkSMcT6TCyFcRvMJbm55E QglJ4bn3VEMzw+FKbzB7RaQ4l9iPudKKj6zewZbniUUinpeeRkWMu597NLJvlrO39Rs4 9LLXeyzmO+iTvVgv6GVvhd2OxFWMJAZl5xEG+AWH1pvu5STBi+vTO9fscrKs6mvQKGBy R1paV7J+M5TUwEMzZMYbMG4qRAxc4+j6B80dLYjLS9h72LQaTH3+fIkDbepTNOVColMD 5lpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=d4h8OXoW9StQ+YypbHzqEhLaogqFHJKP7focuWdzzM0=; fh=IMeDlfYBZs5j2RwC+rd2knsJWqhZtioO8ErbmKmH/Ew=; b=CXAyPRBAdUK3XC/l/gy7hdrccBXxID1Mt+4+nCPXjPAjaFJQ0tuaqn1z3p1fIchnYa Q70LM/5rZAK+iagSy2nZLTG3bJus+SttWYL+sFwB+0NabntsgcBjJqhgSZlQT2hjU4OA bp5KC2bBct6HJba605wS7xcvyvha6r16FJJMlZ/Do5bLSaCv9M0BkDIc3DXq7hVi24hw Jxn8m8ShdSbcKk3M3328nSw0eZKpKkvkWSb+xHHD2UFqkwV9oms5GI2QXpVhkSw9dn7o tquG5TP93YO5Sfj4acsfUA/FD7jO8Zdf8mKA2wvTmT3Mm7r+ig6r7tycemPFZVhYRths iIhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=S1amRd0j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s8-20020a63af48000000b005b1445aad18si290173pgo.285.2023.10.19.13.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 13:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=S1amRd0j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8AB3C83F1CDD; Thu, 19 Oct 2023 13:03:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346531AbjJSUC5 (ORCPT + 99 others); Thu, 19 Oct 2023 16:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230321AbjJSUCz (ORCPT ); Thu, 19 Oct 2023 16:02:55 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2822A115 for ; Thu, 19 Oct 2023 13:02:54 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-5a7eef0b931so382127b3.0 for ; Thu, 19 Oct 2023 13:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697745773; x=1698350573; darn=vger.kernel.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=d4h8OXoW9StQ+YypbHzqEhLaogqFHJKP7focuWdzzM0=; b=S1amRd0jkq46pRcJ2e/14i54hzTaQJleZciB+WPwdRgLuzop7cnogb5i04mcnGcZQQ iqhw4RGsUIvrgJGfXws0LtfFt9v1cRijiYMRa9YTSZco17T6zpUhM3JsgybzN+ViQksp X0eZYqibFFw+7YrIE7M2gQk2MSFxQjVeLrvPvlsf7bKseO3pptG8+9BzFOeASvgv6Uuf fr5dvFYrAViQIjeV7heHu5zS6yocfx2ANHMVqSMsgqZ2Eww9b4a7hdXixHY1Cpvp/bxb uoYJ+sXx6ZDSpwm43ysN8r5tLek8lD57aA+AbF2j+S+j7bDDswFYIpUARaGpOmAY92Rn pVSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697745773; x=1698350573; 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=d4h8OXoW9StQ+YypbHzqEhLaogqFHJKP7focuWdzzM0=; b=ljEAv/YtLiTGtUHT5JBLMRCuT1xKBWsUX3JdTlRGaiwjR7p7Ru5Lr24rluRdHSi0Mp jFf/32sEclEibPSX0O5QNSlMTy5p4lnBpw/4B5iX2fzUgb85048k1cpYUASeZGhZYbBW 7SuQCtZ3Z2BQHnh5H/eQ+n8nvprRYklfRorCNphWTL9JgUuGmwJ/3zWYeP4hrRvLCfiH vvx8eoEz0xmzbmhu+BcJNZBi5whRCN5jgBkR921uMftz5m5baEQeVjK6g4wba6r7YHPz mo/AbLMrUaZtzVszxn6G5Okqg1qBSxHTe0mIq6/imWniQXSucGhyAvAUuJbM/G+4F6Gw A+Ew== X-Gm-Message-State: AOJu0YzGyPBtQs0U7+J4/VUC4t9B7N7kk2JdgtebSbamYrD2JODy3i9e gGy9h2O0WQOd506RhnK2wG7XBy3EoCax30KXD3pK1Q== X-Received: by 2002:a0d:cbc1:0:b0:5a7:fbd5:8c1 with SMTP id n184-20020a0dcbc1000000b005a7fbd508c1mr3222768ywd.17.1697745773027; Thu, 19 Oct 2023 13:02:53 -0700 (PDT) MIME-Version: 1.0 References: <478697aa-f55c-375a-6888-3abb343c6d9d@redhat.com> <205abf01-9699-ff1c-3e4e-621913ada64e@redhat.com> <12588295-2616-eb11-43d2-96a3c62bd181@redhat.com> <8d187891-f131-4912-82d8-13112125b210@redhat.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 19 Oct 2023 13:02:39 -0700 Message-ID: Subject: Re: [PATCH v3 2/3] userfaultfd: UFFDIO_MOVE uABI To: Peter Xu Cc: David Hildenbrand , Lokesh Gidra , 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, jannh@google.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-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 13:03:12 -0700 (PDT) On Thu, Oct 19, 2023 at 12:53=E2=80=AFPM Peter Xu wrote= : > > On Thu, Oct 19, 2023 at 05:41:01PM +0200, David Hildenbrand wrote: > > That's not my main point. It can easily become a maintenance burden wit= hout > > any real use cases yet that we are willing to support. > > That's why I requested a few times that we can discuss the complexity of > cross-mm support already here, and I'm all ears if I missed something on > the "maintenance burden" part.. > > I started by listing what I think might be different, and we can easily > speedup single-mm with things like "if (ctx->mm !=3D mm)" checks with > e.g. memcg, just like what this patch already did with pgtable deposition= s. > > We keep saying "maintenance burden" but we refuse to discuss what is that= .. > > I'll leave that to Suren and Lokesh to decide. For me the worst case is > one more flag which might be confusing, which is not the end of the world= .. > Suren, you may need to work more thoroughly to remove cross-mm implicatio= ns > if so, just like when renaming REMAP to MOVE. Hi Folks, Sorry, I'm just catching up on all the comments in this thread after a week-long absence. Will be addressing other questions separately but for cross-mm one, I think the best way forward would be for me to split this patch into two with the second one adding cross-mm support. That will clearly show how much additional code that requires and will make it easier for us to decide whether to support it or not. TBH, I don't see the need for an additional flag even if the initial version will be merged without cross-mm support. Once it's added the manpage can mention that starting with a specific Linux version cross-mm is supported, no? Also from my quick read, it sounds like we want to prevent movements of pinned pages regardless of cross-mm support. Is my understanding correct? Thanks, Suren. > > Thanks, > > -- > Peter Xu >