diff options
-rw-r--r-- | sbin/geom/class/stripe/gstripe.8 | 7 | ||||
-rw-r--r-- | sys/geom/stripe/g_stripe.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sbin/geom/class/stripe/gstripe.8 b/sbin/geom/class/stripe/gstripe.8 index 7fe1082..fbf4bf1 100644 --- a/sbin/geom/class/stripe/gstripe.8 +++ b/sbin/geom/class/stripe/gstripe.8 @@ -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 diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index 9f6c24d..e490c79 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -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. |