From owner-svn-src-head@freebsd.org Wed May 30 20:24:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A663EFA926; Wed, 30 May 2018 20:24:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29B4E77ED3; Wed, 30 May 2018 20:24:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AFE27FB9; Wed, 30 May 2018 20:24:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4UKOLXM073910; Wed, 30 May 2018 20:24:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4UKOLs1073909; Wed, 30 May 2018 20:24:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201805302024.w4UKOLs1073909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 30 May 2018 20:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334397 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 334397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 20:24:22 -0000 Author: kib Date: Wed May 30 20:24:21 2018 New Revision: 334397 URL: https://svnweb.freebsd.org/changeset/base/334397 Log: Avoid unneccessary TLB shootdowns in pmap_unwire_ptp() for user pmaps, which no longer create recursive page table mappings. Benchmarked by: bde Tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed May 30 20:16:17 2018 (r334396) +++ head/sys/i386/i386/pmap.c Wed May 30 20:24:21 2018 (r334397) @@ -1872,7 +1872,6 @@ pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spgli static void _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spglist *free) { - vm_offset_t pteva; /* * unmap the page table page @@ -1881,16 +1880,13 @@ _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spgl --pmap->pm_stats.resident_count; /* - * Do an invltlb to make the invalidated mapping - * take effect immediately. + * There is not need to invalidate the recursive mapping since + * we never instantiate such mapping for the usermode pmaps, + * and never remove page table pages from the kernel pmap. + * Put page on a list so that it is released since all TLB + * shootdown is done. */ - pteva = VM_MAXUSER_ADDRESS + i386_ptob(m->pindex); - pmap_invalidate_page(pmap, pteva); - - /* - * Put page on a list so that it is released after - * *ALL* TLB shootdown is done - */ + MPASS(pmap != kernel_pmap); pmap_add_delayed_free_list(m, free, TRUE); }