From owner-svn-doc-all@freebsd.org Tue Jul 14 15:26:15 2015 Return-Path: Delivered-To: svn-doc-all@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 BBBC09A1D61; Tue, 14 Jul 2015 15:26:15 +0000 (UTC) (envelope-from wblock@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 ABDD7B3F; Tue, 14 Jul 2015 15:26:15 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6EFQFHl064264; Tue, 14 Jul 2015 15:26:15 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6EFQFco064263; Tue, 14 Jul 2015 15:26:15 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201507141526.t6EFQFco064263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Tue, 14 Jul 2015 15:26:15 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r46970 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2015 15:26:15 -0000 Author: wblock Date: Tue Jul 14 15:26:14 2015 New Revision: 46970 URL: https://svnweb.freebsd.org/changeset/doc/46970 Log: Add Konstantin Belousov 's PCID report. 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 Tue Jul 14 15:08:58 2015 (r46969) +++ head/en_US.ISO8859-1/htdocs/news/status/report-2015-04-2015-06.xml Tue Jul 14 15:26:14 2015 (r46970) @@ -1053,4 +1053,62 @@ The FreeBSD Foundation + + + Rewritten PCID Support + + + + + Konstantin + Belousov + + kib@FreeBSD.org + + + + +

Process-Context Identifiers (PCIDs) is a feature of the TLB + on Intel processors, existing since the Sandy Bridge + micro-architecture introduction. 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 + 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.

+ +

&os; already used PCID, but the existing implementation + had several shortcomings. The amd64 pmap (the + machine-dependent portion of the virtual memory subsystem) + maintained a bitmap of all CPUs which ever loaded a + translation for the given address space, and avoided TLB flush + 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, + 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 + to bugs. These issues resulted in the PCID feature being + disabled by default.

+ +

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 + 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 + performed. As result, the new implementation issues exactly + the same amount of shootdown IPIs as pmap which does not + utilize PCID.

+ +