From owner-svn-src-user@FreeBSD.ORG Tue Feb 17 05:36:17 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D58D9386; Tue, 17 Feb 2015 05:36:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0A4FC13; Tue, 17 Feb 2015 05:36:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1H5aH7Q091192; Tue, 17 Feb 2015 05:36:17 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1H5aHm4091191; Tue, 17 Feb 2015 05:36:17 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502170536.t1H5aHm4091191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 17 Feb 2015 05:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r278882 - user/nwhitehorn/ppc64-pmap-rework/pseries X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 05:36:17 -0000 Author: nwhitehorn Date: Tue Feb 17 05:36:16 2015 New Revision: 278882 URL: https://svnweb.freebsd.org/changeset/base/278882 Log: Enable use of H_PROTECT. This branch currently uses half the system time (and 65% the wall time) of HEAD to complete a make -j32 buildworld. Modified: user/nwhitehorn/ppc64-pmap-rework/pseries/mmu_phyp.c Modified: user/nwhitehorn/ppc64-pmap-rework/pseries/mmu_phyp.c ============================================================================== --- user/nwhitehorn/ppc64-pmap-rework/pseries/mmu_phyp.c Tue Feb 17 05:10:41 2015 (r278881) +++ user/nwhitehorn/ppc64-pmap-rework/pseries/mmu_phyp.c Tue Feb 17 05:36:16 2015 (r278882) @@ -289,27 +289,27 @@ mphyp_pte_unset(mmu_t mmu, struct pvo_en static void mphyp_pte_replace(mmu_t mmu, struct pvo_entry *pvo, int flags) { - struct lpte evicted; + struct lpte pte; int64_t result; PMAP_LOCK_ASSERT(pvo->pvo_pmap, MA_OWNED); - if (0 && flags == MOEA64_PTE_PROT_UPDATE) { - moea64_pte_from_pvo(pvo, &evicted); + if (flags == MOEA64_PTE_PROT_UPDATE) { + moea64_pte_from_pvo(pvo, &pte); result = phyp_hcall(H_PROTECT, - H_AVPN | (pvo->pvo_pte.pa & LPTE_PP), pvo->pvo_pte.slot, - evicted.pte_hi & LPTE_AVPN_MASK); + H_AVPN | (pte.pte_lo & (LPTE_PP | LPTE_NOEXEC)), + pvo->pvo_pte.slot, pte.pte_hi & LPTE_AVPN_MASK); if (result == H_NOT_FOUND) return; KASSERT(result == H_SUCCESS || result == H_NOT_FOUND, ("Error changing page protection: %d", (int)result)); - /* Mark RC changes */ - result = mphyp_pte_clear(mmu, pvo, LPTE_REF | LPTE_CHG); + /* Mark C changes (R zeroed by H_PROTECT) */ + result = mphyp_pte_clear(mmu, pvo, LPTE_CHG); if (result > 0) moea64_sync_refchg(pvo->pvo_pte.pa | - (result & (LPTE_REF | LPTE_CHG))); + (result & LPTE_CHG)); return; }