Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp635160pxy; Fri, 30 Apr 2021 12:53:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNJOBZVL8fxmfHIAXSvQvIzeik+I3A0Gzuk2hMiyiDUG6tR4gp1FNGITMa8NRQMgWaRVhY X-Received: by 2002:a17:902:b683:b029:ed:f0d:5cff with SMTP id c3-20020a170902b683b02900ed0f0d5cffmr6788728pls.10.1619812422941; Fri, 30 Apr 2021 12:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619812422; cv=none; d=google.com; s=arc-20160816; b=KWAqw4JoZauMc78xiTSZ69Q9RNtMrI9CEDUftyvxa0YJMDvBo4SjmYtdTEq/tjMRwm hLe7sKKd/gfLe6nSvAiWVWzMvsHtBNvbhrL6ITkd/qAip2HILmlW9yRqz9AU3zlR349Z 6iZBgQRMG/nBAp+Gsgs4KJ7wxTC8uTPdBC83qKVTT7qitXM74jUIfFlS06KEiLoOjWoN n8HV4cybHVJ8D8ixWXRwcIWDk9/tc4OXTWmwhmnoJb49yMdeQxJDmXB1d/01KlP2gAPD 5YtuZqOxIM2Ow0J37sknczbCj4j7wTpzSjSjlt5muiDdCiO9MCdit7QM/BiP7rpEiQK6 b5ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=XrNJKiD+gmmouaQBEDV3mKD7UNcz8msknbq0XbuTisY=; b=Ras+0GGzvw+BXN+qiB77beKzhkF7bKgqaYxWiJ99/sl83dmnD0LyD7nc2Xa0LpIurY QMUsmvPxyK/rxnxbASrdKCH4SPInks7mmUwD/9eOWmAZI2vUB6Kt/R29zUEkhxJ3RGte Uf88/EqtHKbxT81xX1u9HQ+b27whIR+V/jnhq0EghN+V/cYR+WWSAR77Lg1/tOZ2Ndwd rPXn4v46G2WgHNJoxKsXIEPvaZCcwCvagIIuvqyHl+KMzZ+C22cm9CeldCPOSxIQg6vy agF1mSB7xgXCaa79eOQqnSB++bqioKXtYxqWg2362l0htF9eUyRvLgaBYeaGQ93Vb3Os UeZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-14-rsa header.b=WpKVbH3z; 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=NONE sp=NONE dis=NONE) header.from=lespinasse.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si3284083pfk.200.2021.04.30.12.53.30; Fri, 30 Apr 2021 12:53:42 -0700 (PDT) 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=neutral (no key) header.i=@lespinasse.org; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-14-rsa header.b=WpKVbH3z; 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=NONE sp=NONE dis=NONE) header.from=lespinasse.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233386AbhD3Txk (ORCPT + 99 others); Fri, 30 Apr 2021 15:53:40 -0400 Received: from server.lespinasse.org ([63.205.204.226]:42153 "EHLO server.lespinasse.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232273AbhD3TxW (ORCPT ); Fri, 30 Apr 2021 15:53:22 -0400 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.20.1