From patchwork Fri Apr 30 19:52:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Lespinasse X-Patchwork-Id: 12234163 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 16ABEC433B4 for ; Fri, 30 Apr 2021 19:52:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B4C6F613F8 for ; Fri, 30 Apr 2021 19:52:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4C6F613F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=lespinasse.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 93E566B0070; Fri, 30 Apr 2021 15:52:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B7EF6B0071; Fri, 30 Apr 2021 15:52:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AD696B0073; Fri, 30 Apr 2021 15:52:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id D7CFE6B0071 for ; Fri, 30 Apr 2021 15:52:35 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7FCB7181AF5F4 for ; Fri, 30 Apr 2021 19:52:35 +0000 (UTC) X-FDA: 78090080670.39.43B353A Received: from server.lespinasse.org (server.lespinasse.org [63.205.204.226]) by imf25.hostedemail.com (Postfix) with ESMTP id 8F7436000113 for ; Fri, 30 Apr 2021 19:52:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-14-ed; t=1619812353; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=XrNJKiD+gmmouaQBEDV3mKD7UNcz8msknbq0XbuTisY=; b=c/51/1unLYjIqVdN/mCnwDipupc8y9BaUfUWoaPw+8lcfZzM8MTrGl0GR8iCl86G/el+9 VkBqOtDJ9Dy7dbLAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-14-rsa; t=1619812353; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=XrNJKiD+gmmouaQBEDV3mKD7UNcz8msknbq0XbuTisY=; b=WpKVbH3zCSFSsOUWUEnw+ZlensRRNG8hYH+1jHHA3Hyq1YoY2rSXA/wnfwQ2Jc2ePKIeO eWfcLF3MFa7LhjKg4RzrswI+/6Lydp+qTR0Tt98CAhdDUki3z08/wYDH6Ulm41YdbbRgA50 r6AMvdvhQN2OO1GXwCcjLxj8tDxcX7HgfD8vGOL60hYuAJkE7QYQO8KSbZFJBEfIcrjeQf8 lSVKjvYwHUvz0RnDbdJwU+f3+Kr4q/GMwN6YXyeVLiU4MZQo9tXfg28en2dVA1y+GeSKHnJ W1Vv+qI7lse73tZxG0LvC5oySnCnQqHqywx2us2XmTIDnarGZZgsuI9PWLrA== Received: from zeus.lespinasse.org (zeus.lespinasse.org [IPv6:fd00::150:0]) by server.lespinasse.org (Postfix) with ESMTPS id 2635516030E; Fri, 30 Apr 2021 12:52:33 -0700 (PDT) Received: by zeus.lespinasse.org (Postfix, from userid 1000) id 144E919F525; Fri, 30 Apr 2021 12:52:33 -0700 (PDT) From: Michel Lespinasse To: Linux-MM , Linux-Kernel Cc: Laurent Dufour , Peter Zijlstra , Michal Hocko , Matthew Wilcox , Rik van Riel , Paul McKenney , Andrew Morton , Suren Baghdasaryan , Joel Fernandes , Andy Lutomirski , Michel Lespinasse Subject: [PATCH 04/29] do_anonymous_page: use update_mmu_tlb() Date: Fri, 30 Apr 2021 12:52:05 -0700 Message-Id: <20210430195232.30491-5-michel@lespinasse.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210430195232.30491-1-michel@lespinasse.org> References: <20210430195232.30491-1-michel@lespinasse.org> MIME-Version: 1.0 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=lespinasse.org header.s=srv-14-ed header.b="c/51/1un"; dkim=pass header.d=lespinasse.org header.s=srv-14-rsa header.b=WpKVbH3z; dmarc=pass (policy=none) header.from=lespinasse.org; spf=pass (imf25.hostedemail.com: domain of walken@lespinasse.org designates 63.205.204.226 as permitted sender) smtp.mailfrom=walken@lespinasse.org X-Stat-Signature: 7emabjy3zyt76xwn9gqz34peqeemxtmb X-Rspamd-Queue-Id: 8F7436000113 X-Rspamd-Server: rspam05 Received-SPF: none (lespinasse.org>: No applicable sender policy available) receiver=imf25; identity=mailfrom; envelope-from=""; helo=server.lespinasse.org; client-ip=63.205.204.226 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619812349-940072 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: update_mmu_tlb() can be used instead of update_mmu_cache() when the page fault handler detects that it lost the race to another page fault. (TODO double check with Bibo Mao ) Signed-off-by: Michel Lespinasse --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 550405fc3b5e..59ff65cb3ab4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3567,7 +3567,7 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf) vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address, &vmf->ptl); if (!pte_none(*vmf->pte)) { - update_mmu_cache(vma, vmf->address, vmf->pte); + update_mmu_tlb(vma, vmf->address, vmf->pte); goto release; }