Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1443829pxb; Thu, 4 Feb 2021 13:09:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyE3J+HumFC49kkriSod/+zOjDZgMb0SfgKY2f6vqKe/P4lNfEl7SKLMBys+4hlXCFyvU5R X-Received: by 2002:a17:906:16c6:: with SMTP id t6mr966871ejd.102.1612472996597; Thu, 04 Feb 2021 13:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612472996; cv=none; d=google.com; s=arc-20160816; b=PyHsS1Serb08ZLDWGUjtmv0adAJJfR7kKgWyH3J1gfxjk0+WtXr0m+/Cdz/3WcAnH2 XSFx7dhJhHx99Y+sw5mOFoIdrlIMwCfPUb0qbxnU0fUVLjFw10BEyAwlJ/M2xsyOUmQ+ KOJub35R1Qr7+auGtPBYT5h9kq9L28ERQ7J1nWJHk+BXnXoItuB1Frv4TsC2S6ys7kE8 zqIXVVDzRPwQALa7P8iBRHGhnhjYe4Ei6D6+yUkODEzabEjrGGkwbB95CoriVMcA0R7Q QfFMzdExjvHyT5NVeU+yci5whBzBNNZSE6fL6L7A/tvYqbSX9vtjNBJ0LnAaGfc4WMS3 Pukg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/6flMUs4q/9e4K9Y4oNKr3UzQiLVqc1VXmMcTE8n99U=; b=DL2/DA57QRs+vBoGtbJc0vKLgOhACGrtqtWD9HBDT9xaZ055tDMAHsxvtUs7Fj2yXv cOr8eGJx8Qtrg2gU3jmTm77z2SqJu7naph0ArDnMcqJo0E9LlSGRsg+0epYDlJiLx8ud KtUIJ/QQ7xncfAxW3yUtxxbiU7LxIerkpWtCBiEGLajUNfnvwYjtT/ZOR8fGXkx6ExRy J9qJyG7WjOwxShcJxyvgtSVLgCPBqZDydJYH8b6FoLikr3ADBCUEh4XInmLd0BxsnHbo W2qmMi8Ud1w53EVuPKjS5Tevzo55N1a1pP5zmDoCylM1qYq5jVfem2OCPWW72W5ggMnR 9KjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=1MUnI9zX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si4394921ejd.310.2021.02.04.13.09.32; Thu, 04 Feb 2021 13:09:56 -0800 (PST) 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=@infradead.org header.s=merlin.20170209 header.b=1MUnI9zX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbhBDVJC (ORCPT + 99 others); Thu, 4 Feb 2021 16:09:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbhBDVJA (ORCPT ); Thu, 4 Feb 2021 16:09:00 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2757BC0613D6; Thu, 4 Feb 2021 13:08:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=/6flMUs4q/9e4K9Y4oNKr3UzQiLVqc1VXmMcTE8n99U=; b=1MUnI9zX+7iDTvEFR0Pt6icYxu mZ0ZyOaeDZsskWkqJeU7vtB0JnCkIOLZyfNXASIxi0b4QTf5IaRht1p94TCyh3zegg2ykVxwoY5Zh +unY6QrqC1Mr60qKAWBi0wN/j8dzfalXVyy2Itpw/nxhPi4S4KqVafbacIx5ejEXJoTmPZBz24wVA O/DZiE8A+2YvwFWzzW94kinajywJXZCDfRceMOxs3+LCZbtohSXpQ4seC/yBmnE8fTy3PL4xfE8ed X+2ju8NWiVdnoHmvi2aIjYxPzuPcRnLVZ8SdWx4pl+NwEn8QDhZ36x13b8CqXDTCX1T5yxCLcVoF9 sAGB1qSg==; Received: from [2601:1c0:6280:3f0::aec2] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7lrD-00043v-4y; Thu, 04 Feb 2021 21:08:07 +0000 Subject: Re: [PATCH v4 09/10] userfaultfd: update documentation to describe minor fault handling To: Axel Rasmussen Cc: Alexander Viro , Alexey Dobriyan , Andrea Arcangeli , Andrew Morton , Anshuman Khandual , Catalin Marinas , Chinwen Chang , Huang Ying , Ingo Molnar , Jann Horn , Jerome Glisse , Lokesh Gidra , "Matthew Wilcox (Oracle)" , Michael Ellerman , =?UTF-8?Q?Michal_Koutn=c3=bd?= , Michel Lespinasse , Mike Kravetz , Mike Rapoport , Nicholas Piggin , Peter Xu , Shaohua Li , Shawn Anastasio , Steven Rostedt , Steven Price , Vlastimil Babka , LKML , linux-fsdevel@vger.kernel.org, Linux MM , Adam Ruprecht , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Mina Almasry , Oliver Upton References: <20210204183433.1431202-1-axelrasmussen@google.com> <20210204183433.1431202-10-axelrasmussen@google.com> From: Randy Dunlap Message-ID: Date: Thu, 4 Feb 2021 13:07:55 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/4/21 1:04 PM, Axel Rasmussen wrote: > On Thu, Feb 4, 2021 at 11:57 AM Randy Dunlap wrote: >> >> Hi Axel- >> >> one typo found: >> >> On 2/4/21 10:34 AM, Axel Rasmussen wrote: >>> Reword / reorganize things a little bit into "lists", so new features / >>> modes / ioctls can sort of just be appended. >> >> Good plan. >> >>> >>> Signed-off-by: Axel Rasmussen >>> --- >>> Documentation/admin-guide/mm/userfaultfd.rst | 107 ++++++++++++------- >>> 1 file changed, 66 insertions(+), 41 deletions(-) >>> >>> diff --git a/Documentation/admin-guide/mm/userfaultfd.rst b/Documentation/admin-guide/mm/userfaultfd.rst >>> index 65eefa66c0ba..cfd3daf59d0e 100644 >>> --- a/Documentation/admin-guide/mm/userfaultfd.rst >>> +++ b/Documentation/admin-guide/mm/userfaultfd.rst >> >> [snip] >> >>> - >>> -Once the ``userfaultfd`` has been enabled the ``UFFDIO_REGISTER`` ioctl should >>> -be invoked (if present in the returned ``uffdio_api.ioctls`` bitmask) to >>> -register a memory range in the ``userfaultfd`` by setting the >>> +events, except page fault notifications, may be generated: >>> + >>> +- The ``UFFD_FEATURE_EVENT_*`` flags indicate that various other events >>> + other than page faults are supported. These events are described in more >>> + detail below in the `Non-cooperative userfaultfd`_ section. >>> + >>> +- ``UFFD_FEATURE_MISSING_HUGETLBFS`` and ``UFFD_FEATURE_MISSING_SHMEM`` >>> + indicate that the kernel supports ``UFFDIO_REGISTER_MODE_MISSING`` >>> + registrations for hugetlbfs and shared memory (covering all shmem APIs, >>> + i.e. tmpfs, ``IPCSHM``, ``/dev/zero``, ``MAP_SHARED``, ``memfd_create``, >>> + etc) virtual memory areas, respectively. >>> + >>> +- ``UFFD_FEATURE_MINOR_HUGETLBFS`` indicates that the kernel supports >>> + ``UFFDIO_REGISTER_MODE_MINOR`` registration for hugetlbfs virtual memory >>> + areas. >>> + >>> +The userland application should set the feature flags it intends to use >> >> (ah, userspace has moved to userland temporarily. :) > > For better or worse, other parts of the document I'm not touching also > use this wording. Maybe we should s/userland/userspace/g, but perhaps > better done as a separate commit to keep this diff focused? > Anecdotally, the use of "userland" doesn't seem to be completely > unprecedented (e.g. grep -r "userland" | wc -l yields 566 matches in > the kernel tree). > > I don't have strong feelings, and I was amused by picturing some > Shire-esque countryside with a friendly sign that reads: ~userland > welcomes you~. :) I'm OK with not changing it. Up to you. -- ~Randy