From nobody Fri May 24 15:40:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q120c7z5LGty; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Q10YbTz4vhN; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayPTQTo/gMW3p6aN6X1ZxmfGZq3ra0/H0K0E7rAqgqA=; b=Je1FMxWl+sES0Eqbq6xd2JQjvsWPTOSNdjDF4myrQ19d+Hld4qi8XloR4epECwfUvRBlx/ aIDTFh5bLkkaD/xPuiCoRl2VfPNuTUGi9drq1+SXj3zuqdysHj7EjCXF4DY6cEuzGWZ/IN vkXoGd2jYSdgujMOWPsNND/C9Yc6UT7X2w1Ko4jgfuSMXfYvjOdntrgp+NhyzPd7VfPL8s S17gfSFHjfA9hOWN12NgTCKe2B9AftClOT0Sig0rFfcVIXX7bDuebMUd7dHtR4s8+iCJZP 6HDJw59iryap/KpDX4+q4WDYke35yfV3FB6RGYECXKyEgLy8/M1n1DQsDeTBMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565241; a=rsa-sha256; cv=none; b=uD7G+2CcthwTjhxQkUoCdqrI3uF8JA8ST8feo/dPFgq2hOin+foMPTcPtza2RE09R56fFC PN3rRozmyygB97uyOasl74M+9JAPdDPQH7RIzPkEv9gUm2xNTEu2r9NlxnnSmeziTOTl49 8Gs3tK+PIb0Jra0WhBmyLYW3RWmax11w7sRcZVwDY+mAqtLAMeJiVaCIjxPh6mSrnccMOV cUt4hN4kvMlbjwVFDnHwh0/W2rSd+H2dAOhl763FHbRnCsJRCh9qFv9sRcR/lCHgPlD14I V7Z4He0HAzfZcI/nxqRtIMmtPwUZRXGBZM9NoauBDiGFEBbEH8Y2Z4ix2qG6PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayPTQTo/gMW3p6aN6X1ZxmfGZq3ra0/H0K0E7rAqgqA=; b=dXsM10ZR9Z2MakW2Nr4MEDo5cRxIcrtBH99wlG8VGQbtheWiM8HX4sF17J94lCLX+R6E99 VvUEQnOWt5aGAT5rz8zaiGmcpW1BE9RNJkMPJM58QFC3jonlHCjr+j2W5A+5VBRgFMp2kg gPF4UVAwGQ576MVmPeiotdK/Q3bdvJXfNchYWJ+7vyTU/eQB5MTw1wF5B84HuyVTLUXP8a qepL7giVnnirWY1UMOmnPEJ2i19Ha4DHp4b27bjaOTg2C4TRHzQdnRHEdAR3GutSV8xGsa OsHYCkU+Sm0hxXJMyJq6dRkJBuTCxHkPS717B/8Es/bonNsPTQHz8Wp9I2nW5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vm8Q109jHzfXD; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFeeIQ012157; Fri, 24 May 2024 15:40:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeeU0012154; Fri, 24 May 2024 15:40:40 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:40 GMT Message-Id: <202405241540.44OFeeU0012154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 32f40fc9837d - main - geom: Add counts for enomem and pausing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32f40fc9837daee8e3cb59ae17a28fba4d1c76cf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=32f40fc9837daee8e3cb59ae17a28fba4d1c76cf commit 32f40fc9837daee8e3cb59ae17a28fba4d1c76cf Author: Warner Losh AuthorDate: 2024-05-24 14:31:15 +0000 Commit: Warner Losh CommitDate: 2024-05-24 14:31:15 +0000 geom: Add counts for enomem and pausing Add counts for the number of requests that complete with the ENOMEM as kern.geom.nomem_count and the number of times we pause the g_down thread to let the system recover as kern.geom.pause_count. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45309 --- sys/geom/geom_io.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index ddd469d909a0..25b3908e5fb5 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -75,6 +75,9 @@ static int g_io_transient_map_bio(struct bio *bp); 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 @@ g_io_deliver(struct bio *bp, int error) 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 @@ int inflight_transient_maps; 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 @@ g_io_schedule_down(struct thread *tp __unused) * 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; }