From owner-freebsd-arch@FreeBSD.ORG Tue May 19 21:29:40 2015 Return-Path: Delivered-To: freebsd-arch@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 6B21AE94 for ; Tue, 19 May 2015 21:29:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48BB21822 for ; Tue, 19 May 2015 21:29:40 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 305D0B924 for ; Tue, 19 May 2015 17:29:38 -0400 (EDT) From: John Baldwin To: 'freebsd-arch' Subject: Expand ktr mask to 64 bits Date: Tue, 19 May 2015 17:29:36 -0400 Message-ID: <15438042.GxsTiGo31d@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 May 2015 17:29:38 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 21:29:40 -0000 A common topic has been that the current set of KTR masks is bursting at the seams. I've wanted to fix it by providing some sort of per-class mask and other stuff in the past. However, just changing the masks from int to uint64_t will double the bits we have to work with. It's also a very simple change. It turns out we don't actually need to update the mask with atomic ops anyway since the downside of losing races while changing ktr_mask is pretty minor (may get fewer or more traces). Plus, we don't mark ktr_mask as volatile, so the compiler is free to cache its value anyway making several of those races far wider than worrying about changes to two adjacent words. I've put the diff up at https://reviews.freebsd.org/D2595 for anyone who'd like to review. -- John Baldwin