Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7497293pxb; Thu, 18 Feb 2021 11:36:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrYK6X4SmivnOpV4IpTiWBWoYh4V6B7hOP9JruNyD7vMkugMpHc4YitRlh5XzogYeK3WpR X-Received: by 2002:aa7:cac6:: with SMTP id l6mr5772951edt.357.1613676999288; Thu, 18 Feb 2021 11:36:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613676999; cv=none; d=google.com; s=arc-20160816; b=AQGK7jMWxe0ynuxXwKe+7isREd+lN+10DPGZbI50VFBIx+7uLLLL82GriLe0C9bBb6 PdFy/X61EzZ+dIaecgBKi5FSdb2s3vvFrXMEuT62u5qpRIRZ6wtcSrYiTVtm7Ocl8L2Z 5LSFwCK8FMNtmzK/3trPC+ZIJTlMIuuGnumUpE89FcL9j03WHeRtEJX43aSx/blLclO2 uHHhn1/ZRoSPtb8D2EOalCj9WXOIlkHTVp7DNCFz6hBm6gMtMnFdg2PTC2eYfkLZod2H kSp5S4lF8FNewN3PBdfRWoS6aI2GPnkk2A60OT78W7aUL6E5QE8vtGNWg6YCFAXyB9Ir KU9A== 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=9vIxghfEoCUvaPhBWJXuhAi7CMYaxeuzzYUrJNnMICk=; b=NBIOhJuNQ8TeQnqIzda9gwo5/mI7QgZ/Co+tMhq/H4IrcfyfoWzxRvAn+WFYIEHT/p cd663EWyMNPj083KVr5ymm3UBNqddcgaptchSPwTKq9N1EpVPq1f8bUTnswPz3R2XpGR htwxGzzZgVdHN6DeuCqY6DmBUZ/PDJhaUGAMceOpG61VEj1gLYASaK29N9PvXucGCePl viMfa8sCeElQmm0lCqtUHw3YZyTrSamqKplIBlgC3Tcpb+wLR5Aa9/7DJfDeNDoNEqfv nPO17RHby/yIls3qUlSevQEuC3zN0kAsyC+JV/tToBxEILT4gRmGHX7ZF3LTf14SHoOg PRbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="f/FifjIx"; 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 w5si5272308edv.513.2021.02.18.11.36.15; Thu, 18 Feb 2021 11:36:39 -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=@google.com header.s=20161025 header.b="f/FifjIx"; 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 S231800AbhBRTfi (ORCPT + 99 others); Thu, 18 Feb 2021 14:35:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232001AbhBRSzd (ORCPT ); Thu, 18 Feb 2021 13:55:33 -0500 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 267ACC0613D6 for ; Thu, 18 Feb 2021 10:55:18 -0800 (PST) Received: by mail-io1-xd36.google.com with SMTP id s17so3121789ioj.4 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=TuFkrqiWOkx4op1qPYcwIBwiuyJMd2gIrKyiMXqtBLFtMvsm4RUwX17KyGoqaSo10F q5n6s1kQBGwJJvkBmZC2n4haRcLHnGPojF9Eu3UT7VlhKkg8FJWYcoxl/sM4zPkivmre RY3LRQsCrWXAA6Q93i+c8AqBPGNjYH28REz3cIGPHWDe/RhnMpDRT/2Yog8Lh8iGmmse pXG6q4qRU55CodztOpH0JlKlE4HWPRyKBPQZHXyA6GWjCoCwr8VSzUrx6HKNRpdUhi4H rEr3fis1NDaayMN97rqX/h8odLVyZC1yWx0WAHPZq4T4qAl/wen+/jMeRo5eUkn5OaY3 jp+g== X-Gm-Message-State: AOAM531EKG9jX0ICuTynbojb3omjAoHuLsuPiuciMU+pvNpQOSGOzt9/ i7rDcO2bbsvpTCahzBkHgNhyoK1i4Pux3dd1HPQi4QnIYss= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >