Date: Wed, 23 Jan 2019 00:55:57 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343329 - stable/11/sys/kern Message-ID: <201901230055.x0N0tvrD082114@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Jan 23 00:55:57 2019 New Revision: 343329 URL: https://svnweb.freebsd.org/changeset/base/343329 Log: MFC r342400: Increase MTX_POOL_SLEEP_SIZE from 128 to 1024. This value remained unchanged for 15 years, and now this bump reduces lock spinning in GEOM and BIO layers while doing ~1.6M IOPS to 4 NVMe on 72-core system from ~25% to ~5% by the cost of additional 28KB RAM. While there, align struct mtx_pool fields to cache lines. Modified: stable/11/sys/kern/kern_mtxpool.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mtxpool.c ============================================================================== --- stable/11/sys/kern/kern_mtxpool.c Wed Jan 23 00:54:08 2019 (r343328) +++ stable/11/sys/kern/kern_mtxpool.c Wed Jan 23 00:55:57 2019 (r343329) @@ -60,14 +60,14 @@ static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex poo /* Pool sizes must be a power of two */ #ifndef MTX_POOL_SLEEP_SIZE -#define MTX_POOL_SLEEP_SIZE 128 +#define MTX_POOL_SLEEP_SIZE 1024 #endif struct mtxpool_header { int mtxpool_size; int mtxpool_mask; int mtxpool_shift; - int mtxpool_next; + int mtxpool_next __aligned(CACHE_LINE_SIZE); }; struct mtx_pool {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901230055.x0N0tvrD082114>