Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1509208pxf; Fri, 9 Apr 2021 10:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs0JI3DRYWsgK/6vbFj2GHABLikd/OpCgA7Dh9WEZm/iUqurXVCfVB8HVMtBx+r9VLWOnE X-Received: by 2002:a62:1c86:0:b029:205:5428:41eb with SMTP id c128-20020a621c860000b0290205542841ebmr13491621pfc.33.1617987959391; Fri, 09 Apr 2021 10:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617987959; cv=none; d=google.com; s=arc-20160816; b=AGK4Jf0dEoVSJFSwLBTZoPvwp4lVjt9QqtVEMVrn4cd1DUlBCw/9oXazuMAhDhfEHP cPuxDct4rOCBMgv/AnTQGgk0AGaWBrsgrg7P76tTrdwy7h4GPkRv+klCiTwkmp3fmuT/ 8U14QRqCpq6xb1Tr9+mqmT1Sgrde2Vxlz8nEugeGLTBH6hBnEq6M01XTAlniGra2dgiy th3cxVWGjsXLPRafaGP/v58Gytovk0Aeb8lt2LQPI6KtYwEQTv6QW/TBEYq87q9l7gpY RiCP5YvhcPgD0V6ULsNmw6+4u1nWP1jLGrlvKA+PsmXtc4kmna+sPpbGLeObTDgHpadh Uv0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=tZExfZaItW8I8mhIQZwJxd1DH8tD4RWPfY6sL+HgdVY=; b=cArw696rkje67yj+PuQasvVyWd7L5jjyMciL4vje8leHPLpVJYAmD7Kx2PIWNxtKT+ HC8R3vakA6uwK5D8W1dW54tWgc+Ro4CTNme33VWB6a+LawdtUdJxhsaVZRH89Mb7GrWm mu0BeoH3YGKoIQQ1LxFWowMJfOwkjDOsaMc69Ng9nwutZnsanJcvKf2kQxlj/G3D4Lun ezS0YzJisXGCKraYuInwztwA2OUdo+va1nBAFhx7IQTOXRKRzCTSzJoLtRQRRHajiAnr vab07AcfVShOLu1hKxAfWvvP2rx4vD86ddx9F6RagNX+Q4jolLZo/t9Imprp5ozPW5zr DqSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LpGpVWkF; 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 v1si4315934pfi.75.2021.04.09.10.05.47; Fri, 09 Apr 2021 10:05:59 -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=LpGpVWkF; 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 S234243AbhDIREr (ORCPT + 99 others); Fri, 9 Apr 2021 13:04:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234222AbhDIREo (ORCPT ); Fri, 9 Apr 2021 13:04:44 -0400 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70E39C061763 for ; Fri, 9 Apr 2021 10:04:30 -0700 (PDT) Received: by mail-il1-x12b.google.com with SMTP id x12so2431465ilm.2 for ; Fri, 09 Apr 2021 10:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tZExfZaItW8I8mhIQZwJxd1DH8tD4RWPfY6sL+HgdVY=; b=LpGpVWkFN6IMUF2DmNCDOz5Lr43s5Mdk0xGtSotDyp7K7I9pO3VTOb+DwJ1rvNd8Ac TS2DvgkHDVuxh4QXFbqqNv0rTiX4bcksCQgLMTKtgAW5hkDSFdjL0gBon4114r48HTIH WRb8Co81Ctlicn7/2099Bw28/SUhSV6Fs01MVitACqs+0mqOyWnw5OYof/3cC92vfIGa MlT0GGIbZO6AM0+48idHFJrFlGY6XRXUf/wLp9FmxyeNJsSopQVn7MBWGJXlw9H/5edT mZMgszZ4Kg6DT+D/MIs1Kk9xu4H+GdFu2CZGz84dFURvWISly+gxFjErlhkBxMaGgFgs mMsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tZExfZaItW8I8mhIQZwJxd1DH8tD4RWPfY6sL+HgdVY=; b=giWHR4EEXDd6HC66VLCZXGJNLccxQgOyE/8/VgCwwzm+RCJ48MLt/19g4n+MqyER4M plRtpRkgdJWiOiD9VnYmCxzuC0SdRH7DaMK58/XzziWN9KEp0ynKEO426dYkkjiTPJyc 6i3RXBS45wa9O8lbJhJEOEkQRpv4Io6oNBl2BA1j+Yn7I4NmDziGXPSiCipJejJ9Qzr9 1dIcJk+ZwhKzVZn1zFEozNcdg/XrlSvWo4CFbNetp1cjn4qREMWlJY0nZ+y3lzQ0m/mQ OIms8UZdwyRWjdtcXttaCTv5dQBXQknNcXc+oBIkqCguFvFjE4AKKjonfVIAQ5zgSJCb 05zw== X-Gm-Message-State: AOAM530IOOjc9JargEw9MHwW/vsD9TBZwZ/j8VSj89/46xBXkO7t+bLf 5/AHjYx4kn/rN6w8npdPBzg5eK32tMUVWazuhC5JMQ== X-Received: by 2002:a05:6e02:4cd:: with SMTP id f13mr12318125ils.258.1617987869608; Fri, 09 Apr 2021 10:04:29 -0700 (PDT) MIME-Version: 1.0 References: <20210408234327.624367-1-axelrasmussen@google.com> <20210408220440.aab59f2f06beb840c22377b3@linux-foundation.org> In-Reply-To: <20210408220440.aab59f2f06beb840c22377b3@linux-foundation.org> From: Axel Rasmussen Date: Fri, 9 Apr 2021 10:03:53 -0700 Message-ID: Subject: Re: [PATCH 0/9] userfaultfd: add minor fault handling for shmem To: Andrew Morton Cc: Alexander Viro , Andrea Arcangeli , Daniel Colascione , Hugh Dickins , Jerome Glisse , Joe Perches , Lokesh Gidra , Mike Kravetz , Mike Rapoport , Peter Xu , Shaohua Li , Shuah Khan , Stephen Rothwell , Wang Qing , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML , linux-kselftest@vger.kernel.org, Linux MM , Brian Geffon , "Dr . David Alan Gilbert" , Mina Almasry , Oliver Upton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 8, 2021 at 10:04 PM Andrew Morton wrote: > > On Thu, 8 Apr 2021 16:43:18 -0700 Axel Rasmussen wrote: > > > The idea is that it will apply cleanly to akpm's tree, *replacing* the following > > patches (i.e., drop these first, and then apply this series): > > > > userfaultfd-support-minor-fault-handling-for-shmem.patch > > userfaultfd-support-minor-fault-handling-for-shmem-fix.patch > > userfaultfd-support-minor-fault-handling-for-shmem-fix-2.patch > > userfaultfd-support-minor-fault-handling-for-shmem-fix-3.patch > > userfaultfd-support-minor-fault-handling-for-shmem-fix-4.patch > > userfaultfd-selftests-use-memfd_create-for-shmem-test-type.patch > > userfaultfd-selftests-create-alias-mappings-in-the-shmem-test.patch > > userfaultfd-selftests-reinitialize-test-context-in-each-test.patch > > userfaultfd-selftests-exercise-minor-fault-handling-shmem-support.patch > > Well. the problem is, > > > + if (area_alias == MAP_FAILED) > > + err("mmap of memfd alias failed"); > > `err' doesn't exist until eleventy patches later, in Peter's > "userfaultfd/selftests: unify error handling". I got tired of (and > lost confidence in) replacing "err(...)" with "fprintf(stderr, ...); > exit(1)" everywhere then fixing up the fallout when Peter's patch came > along. Shudder. Oof - sorry about that! > > Sorry, all this material pretty clearly isn't going to make 5.12 > (potentially nine days hence), so I shall drop all the userfaultfd > patches. Let's take a fresh run at all of this after -rc1. That's okay, my understanding was already that it certainly wouldn't be in the 5.12 release, but that we might be ready in time for 5.13. > > > I have tentatively retained the first series: > > userfaultfd-add-minor-fault-registration-mode.patch > userfaultfd-add-minor-fault-registration-mode-fix.patch > userfaultfd-disable-huge-pmd-sharing-for-minor-registered-vmas.patch > userfaultfd-hugetlbfs-only-compile-uffd-helpers-if-config-enabled.patch > userfaultfd-add-uffdio_continue-ioctl.patch > userfaultfd-update-documentation-to-describe-minor-fault-handling.patch > userfaultfd-selftests-add-test-exercising-minor-fault-handling.patch > > but I don't believe they have had much testing standalone, without the > other userfaultfd patches present. So I don't think it's smart to > upstream these in this cycle. Or I could drop them so you and Peter > can have a clean shot at redoing the whole thing. Please let me know. From my perspective, both Peter's error handling and the hugetlbfs minor faulting patches are ready to go. (Peter's most importantly; we should establish that as a base, and put all the burden on resolving conflicts with it on us instead of you :).) My memory was that Peter's patch was applied before my shmem series, but it seems I was mistaken. So, maybe the best thing to do is to have Peter send a version of it based on your tree, without the shmem series? And then I'll resolve any conflicts in my tree? It's true that we haven't tested the hugetlbfs minor faults patch extensively *with the shmem one also applied*, but it has had more thorough review than the shmem one at this point (e.g. by Mike Kravetz), and they're rather separate code paths (I'd be surprised if one breaks the other). >