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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B1007C433B4 for ; Fri, 9 Apr 2021 21:18:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 280D3610F9 for ; Fri, 9 Apr 2021 21:18:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 280D3610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 858E86B0070; Fri, 9 Apr 2021 17:18:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8086A6B0071; Fri, 9 Apr 2021 17:18:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 633846B0072; Fri, 9 Apr 2021 17:18:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0068.hostedemail.com [216.40.44.68]) by kanga.kvack.org (Postfix) with ESMTP id 3D85F6B0070 for ; Fri, 9 Apr 2021 17:18:31 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EDC668248047 for ; Fri, 9 Apr 2021 21:18:30 +0000 (UTC) X-FDA: 78014092380.40.0994A86 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 06E45C0007D3 for ; Fri, 9 Apr 2021 21:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618003109; 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: in-reply-to:in-reply-to:references:references; bh=6LfDPLi5E0po8MV65N/nBXOnSa/U1n1bpGd2B6Y5zrs=; b=QRDlyCbpBnhX+0MZGD/W3rdH4QOe/lZRNLXLSwnlfKICuVDV4Moic57PWEJ6h4jJrOXtbt g9hoG7Sdb5H1DdmdsDA8F1Uh5E+RWZkIppb/vomomNgwgjXqTvyKzzu8zPVkZHmtPZvRBT zgwzBFhF5B+qSfMi+P4xC1BiUC1QDtA= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-9-QOcnctvbPrWd4XpiqPiN1Q-1; Fri, 09 Apr 2021 17:18:28 -0400 X-MC-Unique: QOcnctvbPrWd4XpiqPiN1Q-1 Received: by mail-qk1-f199.google.com with SMTP id b127so4146119qkf.19 for ; Fri, 09 Apr 2021 14:18:28 -0700 (PDT) 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:message-id:references :mime-version:content-disposition:in-reply-to; bh=6LfDPLi5E0po8MV65N/nBXOnSa/U1n1bpGd2B6Y5zrs=; b=Sv05SLELv8WioiM6814tJw3MVhi7XixG0SSL/TrcvcZ3Igx9I0R+i+LaB1eVElz6XN zvEhFJqO/QBrn+K2UfGfucVRdFNPnCAMRFkAa2nP0uMksSPrCRBh/dj8n1jluXK1ZwqI o1GEzifqw5963kyjZ01dxma//e+85R+qtma43CXLDTzppimK+GkXmwSnVVLGMANGihFP ougZswt0gFKRyWoaVk3O4snkrNP970kt/xhwZG2ZtMzbxsxhV05BEburwKAmHvw7YqY1 z8R3ilkvOyKUlJQ68OH5+ASrz5PeIEWYuY3OFcxhD//bOuLspxKZDUkOy9UPPwQPDQZA oppA== X-Gm-Message-State: AOAM530c6/4CWAcJFrQUb5ivZcRLKxWzUj4WRufop+YlpFSK8IBSZs+u b1HsmKL9FqaVqPX3XL83jgUN0/WN5lEKu8zE2iTTti+z5tjTxyBa1oy6aka5dcQbmoLcbTZXWuN XZEwKajQlWPM= X-Received: by 2002:a05:620a:1369:: with SMTP id d9mr16206724qkl.378.1618003107922; Fri, 09 Apr 2021 14:18:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWcW26HNQ/4u/a9UUVswHcCgm4mQgj1l0Ik4tAPemu5I9vnvbu6buq/FCs5OPNi83I6zujbQ== X-Received: by 2002:a05:620a:1369:: with SMTP id d9mr16206687qkl.378.1618003107587; Fri, 09 Apr 2021 14:18:27 -0700 (PDT) Received: from xz-x1 (bras-base-toroon474qw-grc-82-174-91-135-175.dsl.bell.ca. [174.91.135.175]) by smtp.gmail.com with ESMTPSA id d68sm2628359qkf.93.2021.04.09.14.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Apr 2021 14:18:26 -0700 (PDT) Date: Fri, 9 Apr 2021 17:18:24 -0400 From: Peter Xu To: Axel Rasmussen Cc: Andrew Morton , Alexander Viro , Andrea Arcangeli , Daniel Colascione , Hugh Dickins , Jerome Glisse , Joe Perches , Lokesh Gidra , Mike Kravetz , Mike Rapoport , 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 Subject: Re: [PATCH 0/9] userfaultfd: add minor fault handling for shmem Message-ID: <20210409211824.GH792100@xz-x1> References: <20210408234327.624367-1-axelrasmussen@google.com> <20210408220440.aab59f2f06beb840c22377b3@linux-foundation.org> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 06E45C0007D3 X-Stat-Signature: x1h1dq9mqke8co51wosmhsbau8rqxebp Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618003107-374879 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Apr 09, 2021 at 10:03:53AM -0700, Axel Rasmussen wrote: > 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). Yes I think the hugetlb part should have got more review done. IMHO it's a matter of whether Mike would still like to do a more thorough review, or seems okay to keep them. I can repost the selftest series later if needed, as long as I figured which is the suitable base commit. Those selftest patches are definitely not urgent for this release, so we can wait for the next release. Thanks, -- Peter Xu