From patchwork Wed May 27 02:25:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bibo mao X-Patchwork-Id: 11571657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A30181392 for ; Wed, 27 May 2020 02:25:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7ABA6207CB for ; Wed, 27 May 2020 02:25:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ABA6207CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 790EF800B6; Tue, 26 May 2020 22:25:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7423F80010; Tue, 26 May 2020 22:25:41 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E113800B8; Tue, 26 May 2020 22:25:41 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 3A138800B6 for ; Tue, 26 May 2020 22:25:41 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CA8BA180AD815 for ; Wed, 27 May 2020 02:25:40 +0000 (UTC) X-FDA: 76860908040.29.son73_6209e7326d4e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 9EB9C180868D2 for ; Wed, 27 May 2020 02:25:40 +0000 (UTC) X-Spam-Summary: 2,0,0,7cddffed96c7f6ac,d41d8cd98f00b204,maobibo@loongson.cn,,RULES_HIT:41:355:379:541:973:988:989:1260:1261:1345:1437:1534:1541:1711:1730:1747:1777:1792:1801:1981:2194:2199:2393:2559:2562:2895:3138:3139:3140:3141:3142:3352:3867:3868:3870:3871:4250:4605:5007:6119:6261:7875:7903:10004:11026:11232:11658:11914:12043:12048:12160:12291:12296:12297:12438:12679:12683:12895:13069:13311:13357:14095:14096:14384:14394:14581:14721:21080:21451:21627:30054:30070:30075,0,RBL:114.242.206.163:@loongson.cn:.lbl8.mailshell.net-64.100.201.201 62.2.2.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: son73_6209e7326d4e X-Filterd-Recvd-Size: 3831 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 May 2020 02:25:38 +0000 (UTC) Received: from kvm-dev1.localdomain (unknown [10.2.5.134]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxr2uQz81e3nc5AA--.351S2; Wed, 27 May 2020 10:25:20 +0800 (CST) From: Bibo Mao To: Thomas Bogendoerfer , Jiaxun Yang , Huacai Chen , Andrew Morton , Paul Burton , Dmitry Korotin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stafford Horne , Steven Price , Anshuman Khandual Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Sergei Shtylyov , "Maciej W. Rozycki" , linux-mm@kvack.org, David Hildenbrand Subject: [PATCH v7 0/4] MIPS: page fault handling optimization Date: Wed, 27 May 2020 10:25:16 +0800 Message-Id: <1590546320-21814-1-git-send-email-maobibo@loongson.cn> X-Mailer: git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JVW8JrUvcSsGvfC2KfnxnU UI43ZEXa7IU8a-e5UUUUU== X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Rspamd-Queue-Id: 9EB9C180868D2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: V7: - define function flush_tlb_fix_spurious_fault as inline rather than macro V6: - Add update_mmu_tlb function as empty on all platform except mips system, we use this function to update local tlb for page fault smp-race handling V5: - define update_mmu_cache function specified on MIPS platform, and add page fault smp-race stats info V4: - add pte_sw_mkyoung function to implement readable privilege, and this function is only in effect on MIPS system. - add page valid bit judgement in function pte_modify V3: - add detailed changelog, modify typo issue in patch V2 v2: - split flush_tlb_fix_spurious_fault and tlb update into two patches - comments typo modification - separate tlb update and add pte readable privilege into two patches Bibo Mao (4): MIPS: Do not flush tlb page when updating PTE entry mm/memory.c: Update local TLB if PTE entry exists mm/memory.c: Add memory read privilege on page fault handling MIPS: mm: add page valid judgement in function pte_modify arch/mips/include/asm/pgtable.h | 37 +++++++++++++++++++++++++++++++++++-- include/asm-generic/pgtable.h | 33 +++++++++++++++++++++++++++++++++ mm/memory.c | 30 ++++++++++++++++++++++-------- 3 files changed, 90 insertions(+), 10 deletions(-)