Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163200350
D45309.id138950.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45309.id138950.diff
View Options
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -75,6 +75,9 @@
static struct g_bioq g_bio_run_down;
static struct g_bioq g_bio_run_up;
+static long nomem_count;
+static long pause_count;
+
/*
* Pace is a hint that we've had some trouble recently allocating
* bios, so we should back off trying to send I/O down the stack
@@ -701,6 +704,7 @@
if (bootverbose)
printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name);
+ atomic_add_long(&nomem_count, 1);
bp->bio_children = 0;
bp->bio_inbed = 0;
bp->bio_driver1 = NULL;
@@ -734,6 +738,12 @@
SYSCTL_INT(_kern_geom, OID_AUTO, inflight_transient_maps, CTLFLAG_RD,
&inflight_transient_maps, 0,
"Current count of the active transient maps");
+SYSCTL_LONG(_kern_geom, OID_AUTO, nomem_count, CTLFLAG_RD,
+ &nomem_count, 0,
+ "Total count of requests completed with status of ENOMEM");
+SYSCTL_LONG(_kern_geom, OID_AUTO, pause_count, CTLFLAG_RD,
+ &pause_count, 0,
+ "Total count of requests stalled due to low memory in g_down");
static int
g_io_transient_map_bio(struct bio *bp)
@@ -823,6 +833,7 @@
*/
CTR0(KTR_GEOM, "g_down pacing self");
pause("g_down", min(hz/1000, 1));
+ pause_count++;
pace = 0;
}
CTR2(KTR_GEOM, "g_down processing bp %p provider %s", bp,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 12:12 AM (7 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35338674
Default Alt Text
D45309.id138950.diff (1 KB)
Attached To
Mode
D45309: goem: Add counts for enomem and pausing
Attached
Detach File
Event Timeline
Log In to Comment