Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136767206
D45309.id139047.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.id139047.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 u_long nomem_count;
+static u_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); /* Rare event, but no locks held */
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_ULONG(_kern_geom, OID_AUTO, nomem_count, CTLFLAG_RD,
+ &nomem_count, 0,
+ "Total count of requests completed with status of ENOMEM");
+SYSCTL_ULONG(_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)
@@ -822,6 +832,7 @@
* for that I/O.
*/
CTR0(KTR_GEOM, "g_down pacing self");
+ pause_count++; /* g_down has only one thread */
pause("g_down", min(hz/1000, 1));
pace = 0;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 20, 9:35 AM (48 m, 15 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25719389
Default Alt Text
D45309.id139047.diff (1 KB)
Attached To
Mode
D45309: goem: Add counts for enomem and pausing
Attached
Detach File
Event Timeline
Log In to Comment