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.

MFC after:	1 month
This commit is contained in:
Alexander Motin 2018-12-24 23:52:35 +00:00
parent 511662d083
commit abeb9f61f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342400

View File

@ -62,14 +62,14 @@ static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
/* 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 {