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.3 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, 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 6B982C433DB for ; Thu, 18 Feb 2021 18:55:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE89E64EB4 for ; Thu, 18 Feb 2021 18:55:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE89E64EB4 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 18E436B0006; Thu, 18 Feb 2021 13:55:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1407A6B006C; Thu, 18 Feb 2021 13:55:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 009506B006E; Thu, 18 Feb 2021 13:55:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id DEE0E6B0006 for ; Thu, 18 Feb 2021 13:55:18 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9E43F6D87 for ; Thu, 18 Feb 2021 18:55:18 +0000 (UTC) X-FDA: 77832291516.07.09669C6 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by imf15.hostedemail.com (Postfix) with ESMTP id AAF66A0000FD for ; Thu, 18 Feb 2021 18:55:17 +0000 (UTC) Received: by mail-io1-f50.google.com with SMTP id u20so3080558iot.9 for ; Thu, 18 Feb 2021 10:55:18 -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=9vIxghfEoCUvaPhBWJXuhAi7CMYaxeuzzYUrJNnMICk=; b=f/FifjIx9K0uw8mE7Uj/D1pb3YNguyyXh+x1HHBLvCJ3XiOTcjIRskx7DCWAXsbzUa kUDjIQdpjB7J6GQNRuA0uOicOtZJmlZ4AA2w6115thy7p9zzRnVXjj8lO7x3VKVXvZRj 05bJzj/E/+FZ5TIj/RKOfDV4kh/bGUdk7355GdzZx4XnfrGVSzY/owsC3qtMjK9DflF+ hql+nm2Xa8e5cAYK32f2ZxifRdyX0AyFPjrIWX2bq7e9TUFlx4AhILv5sHtPnLuldpLH lXVI3RTiqw4mL2q2x2cozxwV7cSHfhFWEepH1lv1C/CdfebO54gGaWsj9rkoOltzxsJS XJYg== 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=9vIxghfEoCUvaPhBWJXuhAi7CMYaxeuzzYUrJNnMICk=; b=sBXl91R+6my4BYhLar0w8aKSbE+nxgNM1LMtm0ZPF53xFNq1qI2ArL3a64ClSfb4Mc zHg76g+uaCiDuO8T+C1Vtr1QMj7i1LyYhu6VhXLbmLPFDY8GOvN4zUQTTVQnO9DTjDSu ODyaPfXvyiMYiFahdDAFo6dC1byKPckWtkrraInilm7iNZi4/WicznVmRHrcMo1NA3T/ L4O2EgoJWnCkL+kNRfOmd8POxtqqRN5Y2lnBv0gZjvPqE51JK77u9UeR8xRDCRz32Fdv 7g9eklE7x917xkYHdxZsc39/Bzx87xQh2mfFwRnxsegR344fbpItDqIoSsijIrtopL+I 0edg== X-Gm-Message-State: AOAM532XEI4UBSBctRo8A4X0AXWD+gSeiSFRhqFClxQuiQDGBmkruulW bgtN9MIIVcdPZ8MiKl3dbga18DtTwxI0dZukKybjPA== X-Google-Smtp-Source: ABdhPJwEy6flv/s3qSiyuawZgPXP4p15wbLak0d20uK4imXtkBBTugAjAFKe2Ct8Rc+9g1oao2Edt/b5H7LrAeXn9LQ= X-Received: by 2002:a02:3b29:: with SMTP id c41mr5921693jaa.4.1613674517424; Thu, 18 Feb 2021 10:55:17 -0800 (PST) MIME-Version: 1.0 References: <20210217204418.54259-1-peterx@redhat.com> In-Reply-To: <20210217204418.54259-1-peterx@redhat.com> From: Axel Rasmussen Date: Thu, 18 Feb 2021 10:54:41 -0800 Message-ID: Subject: Re: [PATCH v2 0/4] hugetlb: Disable huge pmd unshare for uffd-wp To: Peter Xu Cc: Linux MM , LKML , Mike Kravetz , Mike Rapoport , Matthew Wilcox , Andrea Arcangeli , Andrew Morton , "Kirill A . Shutemov" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: AAF66A0000FD X-Stat-Signature: ftwepr7tpf4caoeceg1rb3xyfukcg1r1 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf15; identity=mailfrom; envelope-from=""; helo=mail-io1-f50.google.com; client-ip=209.85.166.50 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613674517-573389 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: I reviewed these patches, rebased my minor fault handling series on top of this series, and then ran some stress tests of minor fault handling. Other than the one comment I left about !CONFIG_CMA, I didn't spot any issues. So: Tested-By: Axel Rasmussen (Or Reviewed-By: , if that makes more sense.) On Wed, Feb 17, 2021 at 12:44 PM Peter Xu wrote: > > v2: > - patch 4: move hugetlb_unshare_all_pmds() into mm/hugetlb.c, so it can be used > even outside userfaultfd.c > > This series tries to disable huge pmd unshare of hugetlbfs backed memory for > uffd-wp. Although uffd-wp of hugetlbfs is still during rfc stage, the idea of > this series may be needed for multiple tasks (Axel's uffd minor fault series, > and Mike's soft dirty series), so I picked it out from the larger series. > > References works: > > Uffd shmem+hugetlbfs rfc: > https://lore.kernel.org/lkml/20210115170907.24498-1-peterx@redhat.com/ > > Uffd minor mode for hugetlbfs: > https://lore.kernel.org/lkml/20210212215403.3457686-1-axelrasmussen@google.com/ > > Soft dirty for hugetlbfs: > https://lore.kernel.org/lkml/20210211000322.159437-1-mike.kravetz@oracle.com/ > > Please review, thanks. > > Peter Xu (4): > hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share() > hugetlb/userfaultfd: Forbid huge pmd sharing when uffd enabled > mm/hugetlb: Move flush_hugetlb_tlb_range() into hugetlb.h > hugetlb/userfaultfd: Unshare all pmds for hugetlbfs when register wp > > arch/arm64/mm/hugetlbpage.c | 7 ++- > arch/ia64/mm/hugetlbpage.c | 3 +- > arch/mips/mm/hugetlbpage.c | 4 +- > arch/parisc/mm/hugetlbpage.c | 2 +- > arch/powerpc/mm/hugetlbpage.c | 3 +- > arch/s390/mm/hugetlbpage.c | 2 +- > arch/sh/mm/hugetlbpage.c | 2 +- > arch/sparc/mm/hugetlbpage.c | 1 + > fs/userfaultfd.c | 4 ++ > include/linux/hugetlb.h | 16 +++++- > include/linux/userfaultfd_k.h | 9 ++++ > mm/hugetlb.c | 94 +++++++++++++++++++++++++++-------- > mm/userfaultfd.c | 2 +- > 13 files changed, 114 insertions(+), 35 deletions(-) > > -- > 2.26.2 > >