From owner-svn-doc-head@freebsd.org Sun Jul 19 19:59:02 2015 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E43149A68CD; Sun, 19 Jul 2015 19:59:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.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 CF8341F7D; Sun, 19 Jul 2015 19:59:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6JJx1ba042314; Sun, 19 Jul 2015 19:59:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6JJx1xA042313; Sun, 19 Jul 2015 19:59:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201507191959.t6JJx1xA042313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 19 Jul 2015 19:59:01 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r47019 - head/en_US.ISO8859-1/htdocs/news/status X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2015 19:59:02 -0000 Author: emaste (src committer) Date: Sun Jul 19 19:59:00 2015 New Revision: 47019 URL: https://svnweb.freebsd.org/changeset/doc/47019 Log: Update PCID report based on some feedback from wblock Differential Revision: https://reviews.freebsd.org/D3127 Modified: head/en_US.ISO8859-1/htdocs/news/status/report-2015-04-2015-06.xml Modified: head/en_US.ISO8859-1/htdocs/news/status/report-2015-04-2015-06.xml ============================================================================== --- head/en_US.ISO8859-1/htdocs/news/status/report-2015-04-2015-06.xml Sun Jul 19 19:27:26 2015 (r47018) +++ head/en_US.ISO8859-1/htdocs/news/status/report-2015-04-2015-06.xml Sun Jul 19 19:59:00 2015 (r47019) @@ -1091,19 +1091,20 @@ -

Process-Context Identifiers (PCIDs) is a feature of the +

A Process-Context Identifier (PCID) is a performance enhancing + feature of the Translation Lookaside Buffer (TLB) on Intel processors, introduced with the Sandy Bridge micro-architecture. It allows the TLB to simultaneously cache translation information for several address spaces, and gives an opportunity for the operating - system context switch code to avoid flushing the TLB on the + system context switch code to avoid flushing the TLB upon process switch. Each cached translation is tagged with some context identifier, and at context switch time, the operating system instructs the processor which context is becoming active. The feature slightly reduces context switch time by - avoiding flush, and more importantly, it reduces the warm-up - period for the thread after a context switch.

+ avoiding TLB flush, and more importantly, reduces the warm-up + period for a thread after context switch.

&os; already used PCID, but the existing implementation had several shortcomings. The amd64 pmap (the @@ -1113,9 +1114,9 @@ on the context switch. The bitmap was used to direct Inter-Processor Interrupts to the marked CPU when the operating system needed to perform TLB invalidation. The most - important deficiency of the implementation is the increase of - TLB invalidation IPIs since the bitmap could only grow until - full TLB shootdown is performed. It increases the TLB rate, + important deficiency of the implementation was the increase of + TLB invalidation IPIs, since the bitmap could only grow until + full TLB shootdown was performed. It increased the TLB rate, which negated the positive effects of avoiding TLB flushes on large machines. Secondarily, the bitmap maintenance in both the pmap and the context code was quite complicated, leading @@ -1125,13 +1126,14 @@

The new PCID implementation uses an algorithm described in the U. Vahalia book "UNIX Internals: The New Frontiers". The algorithm is already used, for example, by the MIPS pmap for - assigning the ASIDs to software-managed TLB entries. The pmap + assigning Address Space Identifiers (ASIDs) to software-managed + TLB entries. The pmap maintains a per-CPU generation count, which is assigned to the next unused PCID when the context is activated on CPU. TLB invalidation includes resetting the generation count, which - causes reallocation of PCID when a context switch is + causes reallocation of the PCID when a context switch is performed. As result, the new implementation issues exactly - the same amount of shootdown IPIs as pmap which does not + the same amount of shootdown IPIs as a pmap which does not utilize PCID.

Another change included with the PCID rewrite is a move of @@ -1139,9 +1141,8 @@ making the algorithm easier to understand and validate.

Measurements done with hwpmc(4) on a Haswell machine - indicated that the new implementation reduced the amount of - data TLB misses up to 10 times, without an impact on the IPI - counters.

+ indicated that the new implementation reduced the TLB miss rate by + up to 10 times, without an increase in TLB shootdown IPIs.

The rewrite was committed to HEAD at r282684.