From patchwork Wed Nov 10 10:54:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zheng X-Patchwork-Id: 12611837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A761C433F5 for ; Wed, 10 Nov 2021 11:03:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D38F761221 for ; Wed, 10 Nov 2021 11:03:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D38F761221 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 779796B0073; Wed, 10 Nov 2021 06:03:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 702F26B007E; Wed, 10 Nov 2021 06:03:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A3AB6B0080; Wed, 10 Nov 2021 06:03:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 49CAD6B0073 for ; Wed, 10 Nov 2021 06:03:07 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0268180897 for ; Wed, 10 Nov 2021 11:03:07 +0000 (UTC) X-FDA: 78792733614.03.515783B Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by imf26.hostedemail.com (Postfix) with ESMTP id 7B7C320019EC for ; Wed, 10 Nov 2021 11:03:07 +0000 (UTC) Received: by mail-qv1-f47.google.com with SMTP id j9so1576573qvm.10 for ; Wed, 10 Nov 2021 03:03:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IGTjS9X6O5MHDP8mauZ+DA3PMqh0e9FVGxEeR+4xDgM=; b=4E9Pf+Ux5qiQPyaFELQIdPxWMnKZJis8IWSE3myEyTQTg/ZtXTEmfRj3+xgUYIKqib Amlin7VFQFJ9UH4YWXcbd66LmFZ/Q9HAZ5JznNQb+3eNmtOtBwcniA9rtqgofz2RADaL 3Oevl51wrxppp12TRgvXM83uKsKWlYYvY8hlOln+RIeSnCMzVcMIHjohuG1S/zRLiFAv ifCPerwpG9LO3xn1O7DQl4FAghQmnMGyHsvN7iFTnEDcx0kk+rI4Joggpghut/u+jQr3 dtHkRy2LcimFnQELgVdilPLogAAqcEJ82I/jvSP8xHasm/HtgQ4udpeHg91Uubpsow6a RufA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IGTjS9X6O5MHDP8mauZ+DA3PMqh0e9FVGxEeR+4xDgM=; b=pA2mPAnmtdH0Sj+P4YgY/81nE+vJsSK7/WoI/GO+XiMBVE4Nkmj49TAA41bEpUGmGV ErxpX/x7N+j4thaSlHwaENgaUOykZcc8EPhgNRXdHjzsuX21cpCbv9gmxiPNbRnsAeYz XoMXztxdVlqvhfcnBkpQLfx5IkiPDv0RKZlN+mOHdEEENxOwKwmL8S/7RebmoL9BFg04 MtzICceQVVVojKgp4yQY055kH46zKcB/ZY6H7ic9PkiZxhjTb4n3h3ptgVU4Xzm4bM5p zapjz9S28FAKTpCK8PARWoYgGug2vJYS08ScW5nQjHQBtT87+q8kYhQxmQb+6O2l33y8 dOpQ== X-Gm-Message-State: AOAM533ScoIa4cgS9X0vmdG+66HcQkQ2b47S9oatlpIb/tIySV7H4GLz 0ZehDXT0unI+NRGC5+q+G0WecOWuRe+Zig== X-Google-Smtp-Source: ABdhPJwO0teQCgkCbj+haMRjSvhHg6xl/7vC4w0DoEK+PZZxUK02oqNeIVry9l3a6VyPVJK+jwnH+g== X-Received: by 2002:a62:16c7:0:b0:49f:a6cc:c77d with SMTP id 190-20020a6216c7000000b0049fa6ccc77dmr15313549pfw.23.1636541749492; Wed, 10 Nov 2021 02:55:49 -0800 (PST) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.251]) by smtp.gmail.com with ESMTPSA id v38sm5865829pgl.38.2021.11.10.02.55.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Nov 2021 02:55:49 -0800 (PST) From: Qi Zheng To: akpm@linux-foundation.org, tglx@linutronix.de, kirill.shutemov@linux.intel.com, mika.penttila@nextfour.com, david@redhat.com, jgg@nvidia.com Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, songmuchun@bytedance.com, zhouchengming@bytedance.com, Qi Zheng Subject: [PATCH v3 12/15] mm/pte_ref: update the pmd entry in move_normal_pmd() Date: Wed, 10 Nov 2021 18:54:25 +0800 Message-Id: <20211110105428.32458-13-zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20211110105428.32458-1-zhengqi.arch@bytedance.com> References: <20211110105428.32458-1-zhengqi.arch@bytedance.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 7B7C320019EC X-Stat-Signature: 3wdd3kykyeh5j5ik5bhch36qmmk38fgo Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=4E9Pf+Ux; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf26.hostedemail.com: domain of zhengqi.arch@bytedance.com designates 209.85.219.47 as permitted sender) smtp.mailfrom=zhengqi.arch@bytedance.com X-HE-Tag: 1636542187-997971 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: The ->pmd member record the pmd entry that maps the user PTE page table page. When the pmd entry changes, ->pmd needs to be updated synchronously. Signed-off-by: Qi Zheng --- mm/mremap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/mremap.c b/mm/mremap.c index 088a7a75cb4b..4661cdec79dc 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -278,6 +278,7 @@ static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, VM_BUG_ON(!pmd_none(*new_pmd)); pmd_populate(mm, new_pmd, pmd_pgtable(pmd)); + pte_update_pmd(pmd, new_pmd); flush_tlb_range(vma, old_addr, old_addr + PMD_SIZE); if (new_ptl != old_ptl) spin_unlock(new_ptl);