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=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL 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 A5DFEC433B4 for ; Wed, 7 Apr 2021 22:51:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6452F61182 for ; Wed, 7 Apr 2021 22:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229488AbhDGWvX (ORCPT ); Wed, 7 Apr 2021 18:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhDGWvW (ORCPT ); Wed, 7 Apr 2021 18:51:22 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8684FC061760 for ; Wed, 7 Apr 2021 15:51:11 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id x11so300552qkp.11 for ; Wed, 07 Apr 2021 15:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=akFwvW1OPNUTvr2e/zyj+KD9T58HeKDdv1pZyCx4m3s=; b=DuFPi2GpNFK4QFLfLRuf3hEguynbfHsAkqPmG8FbTdFT76p/tQXsHu07amyvhobFvS vdHvFMcHUQtsmDgP53Bd3z4x/ghUyUMHBYMBCVmNuyc9P/mfugQ/MWu633B3iu5zrNRN +yb1Y/tjbE6cRQ777L85d/W9xXkQ7CVwD2vYbml96Qvi0j2hBMZjazbPYNFE+RIk5vxh aZECALgLkrvWjt7yA/LFghP261JTdP/bY1sS6vWhUlAAWLgITKSXmrnE6T15+QdiA7c0 VQX73UCJjunCOkEgVZrLWtV5bffDnY+V+P6/Ir84+to3gBRpvt+atQPcpGSScNLdFera Y2MA== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=akFwvW1OPNUTvr2e/zyj+KD9T58HeKDdv1pZyCx4m3s=; b=Yu0FRr6EZzqSC24LI9JwXQJLEKAMpay6b10hKvWccVVQP3tVVveWvoIcbRi792Nf+E 3FB/WymyfYkXtDDSb+DIw31X/J4TMgUWa3IUcNQO7Cevt/tPGuWSY7VwQd6Rfz+eOG44 wzbfUJD8pio+UQQr2fCsS0TL5/8SmmWyJlOCNcqEs/dplKeKuBTciYxk291wuk3Ua1ZT cyHPbKAwznPMtcRHhYSyKDRa9s8K+sfOFhhtWRes5TdrW7TPArtbphGZRNmyRYvIwNzF mY4QMspVFuyJVkfoeHJimP72R/n8tjRje5UnTbrs+3qLwMGQK9grdxrWWmPdsg+zixvg 9TdA== X-Gm-Message-State: AOAM530awtdM0RslbLthSYOk8JtUe4T15FGTbTmVe7NbVG64qXjusx3w TCHjnQBFkRQruPF7/O7VMZf/PQ== X-Google-Smtp-Source: ABdhPJxwo5ZTCb8pJWYlrRQi+hQ9q5Ts9Qg8T9xfYtLCCgFcYREh0mV5OiX7ERdLHMrCb14BuF1v5Q== X-Received: by 2002:a37:dcb:: with SMTP id 194mr5795509qkn.4.1617835870547; Wed, 07 Apr 2021 15:51:10 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id s19sm19059776qks.130.2021.04.07.15.51.08 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Wed, 07 Apr 2021 15:51:10 -0700 (PDT) Date: Wed, 7 Apr 2021 15:50:54 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Axel Rasmussen cc: Hugh Dickins , Alexander Viro , Andrea Arcangeli , Andrew Morton , Jerome Glisse , Joe Perches , Lokesh Gidra , Mike Rapoport , Peter Xu , Shaohua Li , Shuah Khan , Stephen Rothwell , Wang Qing , LKML , linux-fsdevel@vger.kernel.org, Linux MM , linux-kselftest@vger.kernel.org, Brian Geffon , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Michel Lespinasse , Mina Almasry , Oliver Upton Subject: Re: [PATCH v4] userfaultfd/shmem: fix MCOPY_ATOMIC_CONTINUE behavior In-Reply-To: Message-ID: References: <20210401183701.1774159-1-axelrasmussen@google.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Wed, 7 Apr 2021, Axel Rasmussen wrote: > Agreed about taking one direction or the other further. > > I get the sense that Peter prefers the mcopy_atomic_install_ptes() > version, and would thus prefer to just expose that and let > shmem_mcopy_atomic_pte() use it. > > But, I get the sense that you (Hugh) slightly prefer the other way - > just letting shmem_mcopy_atomic_pte() deal with both the VM_SHARED and > !VM_SHARED cases. No, either direction seems plausible to me: start from whichever end you prefer. > > I was planning to write "I prefer option X because (reasons), and > objections?" but I'm realizing that it isn't really clear to me which > route would end up being cleaner. I think I have to just pick one, > write it out, and see where I end up. If it ends up gross, I don't > mind backtracking and taking the other route. :) To that end, I'll > proceed by having shmem_mcopy_atomic_pte() call the new > mcopy_atomic_install_ptes() helper, and see how it looks (unless there > are objections). I am pleased to read that: it's exactly how I would approach it - so it must be right :-) Hugh