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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6B6E8C4727D for ; Thu, 24 Sep 2020 17:29:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D4694238D6 for ; Thu, 24 Sep 2020 17:29:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Woov+o1k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4694238D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4895B8E0001; Thu, 24 Sep 2020 13:29:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4128D6B0071; Thu, 24 Sep 2020 13:29:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B4088E0001; Thu, 24 Sep 2020 13:29:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 111816B0070 for ; Thu, 24 Sep 2020 13:29:42 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C258C8249980 for ; Thu, 24 Sep 2020 17:29:41 +0000 (UTC) X-FDA: 77298642162.16.wine03_1d0973827160 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 652CF101A24BB for ; Thu, 24 Sep 2020 17:29:41 +0000 (UTC) X-HE-Tag: wine03_1d0973827160 X-Filterd-Recvd-Size: 4073 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Sep 2020 17:29:40 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id c8so4172679edv.5 for ; Thu, 24 Sep 2020 10:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Rj2Ks53EYaHscbbljFejwCf3ZpdNdZ5OllPTvKUc/0=; b=Woov+o1kw1EK1aSaUuoL3PVlebOvnRY6f+pfbBElcTMbl75/r4kyVtBUDsnkeX7/Io wm6iheIreC2XmElF2f++bs4mxq2Jo5oPsatSG8Rq9ndJBvPxTqpepT+yrWgwj57PI/+a +LZLT4EJ8uM+Sfo1bfA869fgW7IUB9fZK/CS36Gr5qX/YbovR8YQppw88Cq7PEVm+gL+ 9nM8eBWxKo2HfaOLXoOHicT5lFIBAgya71JW7Q+8q8tDqMZfhzhlz8axcUVFuNHnSz6d iDyJR5X1ZI8hqZpXg7R/EK5tsCN0e+zsCTj+Lm8ftwZWlSPybyIhZNE4yjX8f5ua3FZd zbnA== 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=1Rj2Ks53EYaHscbbljFejwCf3ZpdNdZ5OllPTvKUc/0=; b=ZN8cCIjzZAxjcagXPQGW9DIwOikhiGCt3LUc1uDejTjpIa6TzUVAiMl9P/4Fy64ylJ FmZzjY1cL2qoW2kXAC0C9j+A/Pj0lCbsXA7BVvFXCB9VRHhMpDtf3nKXam2mnJ3N5R+M 7WvzLVRNPyK9dxYz/A0V4BPPXbWXDMiO7xoWmFs+qfytUXzdGsNWz/vGlvHtpYvRuBlD /0fP/ciQM+tUdCIamRehwe6FdJcdrBwAsZysyA92q21pC04pdoB2jw581+cDJ/eKJVyk 1xZjRuTfiCr9fRRH8ux+jmKT4ggXe69yWaeFWE2yBCLuUuHRsSlfa1FFib1zpL/tdtZC vopg== X-Gm-Message-State: AOAM533yfvrfzSIBUh4PWrjXOuHZJlAcMPv4U2Qe5zHmnhQbYXjQCn9E H11QciXXK/8LlNfiO0yBNlsHz5hc6Lha8ZOBEtM= X-Google-Smtp-Source: ABdhPJwE+gV2rqKX4L5LNtPzhzs3Evc1OCIOBBlXvRXLiRVnVsWs54pX2kSNC+Idy7rF+BpyJ7sd0cXL0BbzSqh/DMQ= X-Received: by 2002:aa7:cf05:: with SMTP id a5mr1047406edy.313.1600968579647; Thu, 24 Sep 2020 10:29:39 -0700 (PDT) MIME-Version: 1.0 References: <20200921211744.24758-1-peterx@redhat.com> <20200921212031.25233-1-peterx@redhat.com> <20200922120505.GH8409@ziepe.ca> <20200923152409.GC59978@xz-x1> <20200924154750.GG79898@xz-x1> In-Reply-To: <20200924154750.GG79898@xz-x1> From: Yang Shi Date: Thu, 24 Sep 2020 10:29:27 -0700 Message-ID: Subject: Re: [PATCH 5/5] mm/thp: Split huge pmds/puds if they're pinned when fork() To: Peter Xu Cc: Jason Gunthorpe , Linux MM , Linux Kernel Mailing List , Linus Torvalds , Michal Hocko , Kirill Shutemov , Jann Horn , Oleg Nesterov , Kirill Tkhai , Hugh Dickins , Leon Romanovsky , Jan Kara , John Hubbard , Christoph Hellwig , Andrew Morton , Andrea Arcangeli 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, Sep 24, 2020 at 8:47 AM Peter Xu wrote: > > On Wed, Sep 23, 2020 at 09:07:49AM -0700, Yang Shi wrote: > > For tmpfs map, the pmd split just clears the pmd entry without > > reinstalling ptes (oppositely anonymous map would reinstall ptes). It > > looks this patch intends to copy at pte level by splitting pmd. But > > I'm afraid this may not work for tmpfs mappings. > > IIUC that's exactly what we want. > > We only want to make sure the pinned tmpfs shared pages will be kept there in > the parent. It's not a must to copy the pages to the child, as long as they > can be faulted in later correctly. Aha, got your point. Yes, they can be refaulted in later. This is how the file THP pmd split was designed. > > -- > Peter Xu >