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=-23.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham 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 5D6B6C433E0 for ; Thu, 4 Feb 2021 21:04:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C628260C3E for ; Thu, 4 Feb 2021 21:04:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C628260C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1BB336B0005; Thu, 4 Feb 2021 16:04:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 16A976B0006; Thu, 4 Feb 2021 16:04:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05A7A6B006E; Thu, 4 Feb 2021 16:04:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id E55EA6B0005 for ; Thu, 4 Feb 2021 16:04:54 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A26A78249980 for ; Thu, 4 Feb 2021 21:04:54 +0000 (UTC) X-FDA: 77781814908.14.bite30_09135b7275df Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 7406E182299A7 for ; Thu, 4 Feb 2021 21:04:54 +0000 (UTC) X-HE-Tag: bite30_09135b7275df X-Filterd-Recvd-Size: 6796 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Feb 2021 21:04:53 +0000 (UTC) Received: by mail-io1-f41.google.com with SMTP id y19so4799842iov.2 for ; Thu, 04 Feb 2021 13:04:53 -0800 (PST) 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=HV+XckACfIcg3AK8XMs4swxtJ4AOxuPntHPHEvQgCec=; b=MRyhbRM6BU3AS77iFkkM43ylujCLaUJw7P7Il4VpjWeXXFUAJlm1LlFOu+t8CIGDGW G9P+eZSb5AI5yesfmEtwXRkw37EX0TKqEnzJzyl2LG9UvqGyZoNwvpnxSp6RgfPJIVbu BGA696hiUIDHMfVSW3eFB492IUilDk41lwBCoLUbvUSIqE4DTHfNXcw08SpRGHebvpA3 hNXNMw58fLGXk9SoWkurBKIWsIHHlH5A+jJvarPl2NmG10IdcZzdc9//uDeAFeI8cTAb 3O8cSpz0J33qqvSd9tUBVkygCavLLArgZpSaX0gBSdzsuTBHrHLdUogRqAuDrq/msYN/ PNMQ== 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=HV+XckACfIcg3AK8XMs4swxtJ4AOxuPntHPHEvQgCec=; b=W2FKhrAkDksp1qT7jBHlwKurX8snJxf2RQtxyxzcRqkWHKDeg6ldoNpT8Ekw9QwEa1 7Gd4dQAc5uGMob8ilJppIX5+xX2uPF3qhkQnIOtO6ovb9FzbleO5jdHuIns0YnGSpN4w Qz2I9LN1k0aiIAOaTbYKqLlAH4p60SvmaSpqkGSXvYpL13FXYK7pzVddYwC6bUaaaugU D3lGNIGt3xyzxdBkouKxSmomhJUpXhxSR7i3n4Iln47sIrZxVJ/V4wUady0LhNQ7BXu2 fmqzRuDdWaEBNP/kUtHFW9PGOYxXLBdtbj4G2vs8C1GNmfQh8hIJkcPNfdQkdmP9WM/e GalQ== X-Gm-Message-State: AOAM531wD2aye21c6AlDyumtBxWsf6+ftVA9HAzQLvpyWa8i+9cgRN3s u+zLMKYEyQzs0miHVrcSm51+p+MBwtWd5WL50xSKzg== X-Google-Smtp-Source: ABdhPJxobCaJMSVb4mOk5tvF3638jDck4qqF0l7JL/v+chy0r20HrFhvx/rYSTy2Zd33xcyWGup/NLsfDeE/wWYQ/lM= X-Received: by 2002:a05:6638:164f:: with SMTP id a15mr1446296jat.75.1612472693282; Thu, 04 Feb 2021 13:04:53 -0800 (PST) MIME-Version: 1.0 References: <20210204183433.1431202-1-axelrasmussen@google.com> <20210204183433.1431202-10-axelrasmussen@google.com> In-Reply-To: From: Axel Rasmussen Date: Thu, 4 Feb 2021 13:04:16 -0800 Message-ID: Subject: Re: [PATCH v4 09/10] userfaultfd: update documentation to describe minor fault handling To: Randy Dunlap 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 Content-Type: text/plain; charset="UTF-8" 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 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~. :) > > > +when envoking the ``UFFDIO_API`` ioctl, to request that those features be > > invoking Whoops! Will send a new version with this fix. Thanks! > > > +enabled if supported. > > > thanks. > -- > ~Randy >