From owner-svn-src-head@freebsd.org Tue Aug 29 20:33:34 2017 Return-Path: Delivered-To: svn-src-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 C39FEDE5152; Tue, 29 Aug 2017 20:33:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AF06A70333; Tue, 29 Aug 2017 20:33:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v7TKXQbJ060765 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Aug 2017 13:33:27 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v7TKXQPw060764; Tue, 29 Aug 2017 13:33:26 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Aug 2017 13:33:26 -0700 From: Gleb Smirnoff To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322989 - in head/sys: amd64/include i386/include sys Message-ID: <20170829203326.GV1071@FreeBSD.org> References: <201708282228.v7SMSfFv076358@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201708282228.v7SMSfFv076358@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 29 Aug 2017 20:33:34 -0000 Thanks, Conrad! At Netflix we've been running that for several years already. It makes measurable difference. I'm surprised that FreeBSD has been optimized by default for a certain short lived generation of CPUs, and everybody was shy to just make step forward and fix that. On Mon, Aug 28, 2017 at 10:28:41PM +0000, Conrad Meyer wrote: C> Author: cem C> Date: Mon Aug 28 22:28:41 2017 C> New Revision: 322989 C> URL: https://svnweb.freebsd.org/changeset/base/322989 C> C> Log: C> Drop CACHE_LINE_SIZE to 64 bytes on x86 C> C> The actual cache line size has always been 64 bytes. C> C> The 128 number arose as an optimization for Core 2 era Intel processors. By C> default (configurable in BIOS), these CPUs would prefetch adjacent cache C> lines unintelligently. Newer CPUs prefetch more intelligently. C> C> The latest Core 2 era CPU was introduced in September 2008 (Xeon 7400 C> series, "Dunnington"). If you are still using one of these CPUs, especially C> in a multi-socket configuration, consider locating the "adjacent cache line C> prefetch" option in BIOS and disabling it. C> C> Reported by: mjg C> Reviewed by: np C> Discussed with: jhb C> Sponsored by: Dell EMC Isilon C> C> Modified: C> head/sys/amd64/include/param.h C> head/sys/i386/include/param.h C> head/sys/sys/param.h C> C> Modified: head/sys/amd64/include/param.h C> ============================================================================== C> --- head/sys/amd64/include/param.h Mon Aug 28 22:14:16 2017 (r322988) C> +++ head/sys/amd64/include/param.h Mon Aug 28 22:28:41 2017 (r322989) C> @@ -89,7 +89,7 @@ C> * CACHE_LINE_SIZE is the compile-time maximum cache line size for an C> * architecture. It should be used with appropriate caution. C> */ C> -#define CACHE_LINE_SHIFT 7 C> +#define CACHE_LINE_SHIFT 6 C> #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) C> C> /* Size of the level 1 page table units */ C> C> Modified: head/sys/i386/include/param.h C> ============================================================================== C> --- head/sys/i386/include/param.h Mon Aug 28 22:14:16 2017 (r322988) C> +++ head/sys/i386/include/param.h Mon Aug 28 22:28:41 2017 (r322989) C> @@ -82,7 +82,7 @@ C> * CACHE_LINE_SIZE is the compile-time maximum cache line size for an C> * architecture. It should be used with appropriate caution. C> */ C> -#define CACHE_LINE_SHIFT 7 C> +#define CACHE_LINE_SHIFT 6 C> #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) C> C> #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ C> C> Modified: head/sys/sys/param.h C> ============================================================================== C> --- head/sys/sys/param.h Mon Aug 28 22:14:16 2017 (r322988) C> +++ head/sys/sys/param.h Mon Aug 28 22:28:41 2017 (r322989) C> @@ -58,7 +58,7 @@ C> * in the range 5 to 9. C> */ C> #undef __FreeBSD_version C> -#define __FreeBSD_version 1200042 /* Master, propagated to newvers */ C> +#define __FreeBSD_version 1200043 /* Master, propagated to newvers */ C> C> /* C> * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, C> -- Totus tuus, Glebius.