Add and document kern.geom.stripe.fast_failed sysctl, which shows how

many times "fast" mode failed.
This commit is contained in:
Pawel Jakub Dawidek 2004-08-06 10:19:34 +00:00
parent ec70430134
commit cea363682f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133205
2 changed files with 14 additions and 1 deletions

View File

@ -183,6 +183,13 @@ This
.Xr sysctl 8
variable is read-only and can only be set as a tunable in
.Xr loader.conf 5 .
.It Va kern.geom.stripe.fast_failed
How many times
.Dq "fast mode"
failed because of insufficient amount of memory.
If this value is big, you should considern increasing
.Va kern.geom.stripe.maxmem
value.
.El
.Sh EXAMPLES
The following example shows how to set up striped device from four disks

View File

@ -89,6 +89,9 @@ static u_int g_stripe_maxmem = MAX_IO_SIZE * 10;
TUNABLE_INT("kern.geom.stripe.maxmem", &g_stripe_maxmem);
SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, maxmem, CTLFLAG_RD, &g_stripe_maxmem,
0, "Maximum memory that can be allocated in \"fast\" mode (in bytes)");
static u_int g_stripe_fast_failed = 0;
SYSCTL_UINT(_kern_geom_stripe, OID_AUTO, fast_failed, CTLFLAG_RD,
&g_stripe_fast_failed, 0, "How many times \"fast\" mode failed");
/*
* Greatest Common Divisor.
@ -583,8 +586,11 @@ g_stripe_start(struct bio *bp)
fast = 1;
}
error = 0;
if (fast)
if (fast) {
error = g_stripe_start_fast(bp, no, offset, length);
if (error != 0)
g_stripe_fast_failed++;
}
/*
* Do use "economic" when:
* 1. "Economic" mode is ON.