From patchwork Wed Apr 7 01:44:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Lespinasse X-Patchwork-Id: 12186431 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,URIBL_BLOCKED,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 6E07AC433ED for ; Wed, 7 Apr 2021 01:45:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D79D661165 for ; Wed, 7 Apr 2021 01:45:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D79D661165 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 9F4966B0080; Tue, 6 Apr 2021 21:45:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 881FF6B0085; Tue, 6 Apr 2021 21:45:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 539546B0080; Tue, 6 Apr 2021 21:45:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id F31E46B0080 for ; Tue, 6 Apr 2021 21:45:05 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A57E16C2F for ; Wed, 7 Apr 2021 01:45:05 +0000 (UTC) X-FDA: 78003877770.16.47F6C1B Received: from server.lespinasse.org (server.lespinasse.org [63.205.204.226]) by imf17.hostedemail.com (Postfix) with ESMTP id 8C3AB40002D2 for ; Wed, 7 Apr 2021 01:45:03 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-11-ed; t=1617759902; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=Tl7c+fKXT/KEyeD0xB/+YiIdgIzXbLApcUUyx6tYhAc=; b=FhQJE30mUdou3MxgfjANMalYk0yghDWwQJi43mxwrXTvsJtXHEht3xYoY0uKAJ6JB1ifc I0uHh5I2VEUVnMwAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-11-rsa; t=1617759902; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=Tl7c+fKXT/KEyeD0xB/+YiIdgIzXbLApcUUyx6tYhAc=; b=alvJkzgZCHNhI/J/Oxso+FnyCCyAhh/3VhhOpJiJCr7s9TEQrVPgikpbTw51VxBgDCCQI w7FkTc0lTMUagVapscii/LJG9Zm08jY9YDNgDXUE0z4lW5kR1W+S9Bm7eahNxbSt7i1DF/K 4An6MUsN2GjPOpl1dUda0RSDWa3cLilqgXOLffoFdN0/sfyYZzX5wCQWbvcMLlU4vZczU++ RshCSwV2fhPQrh/qq33PSljbSoowyZ9Hha9n3Tc6S2Z3iQmF0nZ/D/jZQ3zPPrxmYhm2yiV f5fZLHOHzsrbKR0OXKHH9hRON9E8GJ3/o+TyF0pKb2X/3KjsPh7xbhDfDKOg== Received: from zeus.lespinasse.org (zeus.lespinasse.org [IPv6:fd00::150:0]) by server.lespinasse.org (Postfix) with ESMTPS id 7C44916022D; Tue, 6 Apr 2021 18:45:02 -0700 (PDT) Received: by zeus.lespinasse.org (Postfix, from userid 1000) id 68FC519F320; Tue, 6 Apr 2021 18:45:02 -0700 (PDT) From: Michel Lespinasse To: Linux-MM Cc: Laurent Dufour , Peter Zijlstra , Michal Hocko , Matthew Wilcox , Rik van Riel , Paul McKenney , Andrew Morton , Suren Baghdasaryan , Joel Fernandes , Rom Lemarchand , Linux-Kernel , Michel Lespinasse Subject: [RFC PATCH 03/37] do_anonymous_page: use update_mmu_tlb() Date: Tue, 6 Apr 2021 18:44:28 -0700 Message-Id: <20210407014502.24091-4-michel@lespinasse.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210407014502.24091-1-michel@lespinasse.org> References: <20210407014502.24091-1-michel@lespinasse.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8C3AB40002D2 X-Stat-Signature: kew1o3ae5gjtfyoy3jbo8ejqijqfotga X-Rspamd-Server: rspam02 Received-SPF: none (lespinasse.org>: No applicable sender policy available) receiver=imf17; identity=mailfrom; envelope-from=""; helo=server.lespinasse.org; client-ip=63.205.204.226 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617759903-640981 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. 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 5efa07fb6cdc..8ee4bd239303 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; }