1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

add tunable for developers working on areas outside of ZFS

to further reduce core size by excluding ARC metadata buffers
from core dumps
This commit is contained in:
Kip Macy 2012-01-28 17:41:42 +00:00
parent e013216e41
commit cc0021eb34
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230647

View File

@ -42,6 +42,10 @@ static int zio_use_uma = 0;
TUNABLE_INT("vfs.zfs.zio.use_uma", &zio_use_uma);
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0,
"Use uma(9) for ZIO allocations");
static int zio_exclude_metadata = 0;
TUNABLE_INT("vfs.zfs.zio.exclude_metadata", &zio_exclude_metadata);
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN, &zio_exclude_metadata, 0,
"Exclude metadata buffers from dumps as well");
/*
* ==========================================================================
@ -217,13 +221,14 @@ void *
zio_buf_alloc(size_t size)
{
size_t c = (size - 1) >> SPA_MINBLOCKSHIFT;
int flags = zio_exclude_metadata ? KM_NODEBUG : 0;
ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT);
if (zio_use_uma)
return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE));
else
return (kmem_alloc(size, KM_SLEEP));
return (kmem_alloc(size, KM_SLEEP|flags));
}
/*