Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp948678pxf; Wed, 7 Apr 2021 15:52:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6jvpvGGw+kqo9Lv3H2Bymo68qV47GZ06zKMtaRVReihhN7YqWiJGbcYavwMoZSxcBD6VZ X-Received: by 2002:a05:6a00:168d:b029:23f:376d:a2f8 with SMTP id k13-20020a056a00168db029023f376da2f8mr5004137pfc.20.1617835923552; Wed, 07 Apr 2021 15:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617835923; cv=none; d=google.com; s=arc-20160816; b=wmjIcggkl2AWtJNAueDUOYwshlNh2NRf6uFO4zAgmCHpt8x7h3yu+CF7l7sfJDJ9zW 6N3AQuTdeWsFTSxS+IoYwdyJcvFPsv21EQYURY2P+CZ9r97ODvh8Nzk4zmDJrWsK39Uj DSmQ5GXeQyhiTfn2R+JMQ0koQRSZ8QK7LT2uxv9PE/czKlzuGweBO94rsV3ZToBX3xxi iv1ydvo1yRhQuw0XAJffF5vEn2bf3rDkgWEd44xHxjXhrTkY7RoKIp14nx+mloMTpWzp OV0l05E2qudwvs4uK9939GPbgmzo/OP1fhscNC4DEaj9nYDnFRectf8woNT1rHWgReqO ot/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=akFwvW1OPNUTvr2e/zyj+KD9T58HeKDdv1pZyCx4m3s=; b=YTHukJhRYN+FBinW2QEg6DcPxXvBFrlpoTUCjEjZ1bnCsSfk6ii/TkCKGHJK4ksxQ9 +RZ3U73hkbD2eu/GlUSG0R1G/BqtVNZl1njuphqiobV3j6qrUOzVM1RCYCdbvhhSH3Ts Q3mD7AA1R/9nrMwZZRwKLjdhtcSOldaxeVUzey2IonBkoarNehB8tFFoUvw/wZqgjmaY AezPqcFs2AMagXi2KLGc2TvSnndc80hQ1kKYBLZADSANGpoRhvoDJf7xeMGA2anfTxUL R2JB1yd5GMBGyy7gvPmaNcn223A1YZnJoGJtGFGle2xbUrNChmB4Yz159olE3LKyCgGO +Mow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DuFPi2Gp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l67si24850487pga.362.2021.04.07.15.51.51; Wed, 07 Apr 2021 15:52:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DuFPi2Gp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229514AbhDGWvW (ORCPT + 99 others); Wed, 7 Apr 2021 18:51:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbhDGWvW (ORCPT ); Wed, 7 Apr 2021 18:51:22 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8489C061762 for ; Wed, 7 Apr 2021 15:51:11 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id x14so309373qki.10 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=jnbMgouITKiepbqRoU34jufOHyx3hSjAw8FasVOD1CFqiBw4mIEyeaIyvMwz2qp5Ri AnHgBg8Y4JDebVaS9c93uQKYCYjmLi+Pr8DoS7IFuANGFoyKTqGGcfu6kNFbXczYWb5Y hkCNC+c4nyJ1FbAI9xkGITtayfoz6XPccBnA3+VvmfEU5Faf0P4FzfxUxwGoRirwdkhp 00K+VrKuYvBetdkPoFjkGl8SFbukU52Ei4+MaNaA6qEx890NgUcGPCvWBwOCuQRbgBqQ c0lCzN/H5YE8n1oe1zX04NFBkxatlbn66otpxDZjpDCboyL+Qbr5FDyr9VVOUC+GI7Qy FArQ== X-Gm-Message-State: AOAM530GnVRaRUj5NqHazzvDvWdtuZFn/wYqSNHkdushrMlPhfnbfiHo paaPFxeCYdZ8krQbIBM4du+zUQ== 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-kernel@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