From nobody Sat Jul 20 02:59:07 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 4WQrpz4k7gz5Qxjk; Sat, 20 Jul 2024 02:59:07 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQrpz3q0yz43BJ; Sat, 20 Jul 2024 02:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721444347; 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=ykcTW4rh9pXGay7pkBKzoNpyqIsfRYl99WN2Q9Xn7+w=; b=TOsgpxSJMr4BnRrGJyBnXazSrgvxd0+GPhj9i0lLRsSykPUg8Awf6OmhVd5a8BdM78n/Ch upRSMU/3NxSnwXJjt13cDNppI//1sC4IQx9qOpXoTHS28sRwR1vf+DrPwB2FzkNwzoDHP4 uVUDMbbeHUvR0vAnxj3qcfHVbf1lt4Jr8EJ75us7RiRaMStKHngjIaOmYjfimag2DCTCv2 zX7f8+ycT3Wy2Bzp8ps7bIsGHOOhX2qLfqfgf++98t/4QzoTcMcv76DS8+iOlN05Fw2z8n FNq9szSBP8LMRfj2iIx3w4EQafC16SXL/ko0I36K8Mi6sd08FYhhNoOPU6BrRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721444347; a=rsa-sha256; cv=none; b=idS+LrvocIZX0SJVuD5VWAoPNa8ipuctZDNjZaPNvLN3r+cEFwACKhcgoNTb4RXvv05yZT beuy3kC1H62/ULj/3gdz8B1s2Sbcy6MbWHp8oR2OF+p6gO7oNJGLTbRUo+FqItNfpTdTj4 J28WsHn6HmQlP7qPeVVeLpZFLVa6b4flI8bxzDri+mW7h9acj3QJE5ywjM+eTGADR6oqA5 Qsy5mbwK4goPcXhaBCt7id4nksWNp9EQiCI4svN2M9Qy90HaCnGrRmRMQTVU2bFi/jeYUx tFWeGfTTGy42FoQL3UNteSSyWqYwNWJbI4uEwen79GOWGAclFh9jp+oRUgXj0w== 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=1721444347; 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=ykcTW4rh9pXGay7pkBKzoNpyqIsfRYl99WN2Q9Xn7+w=; b=dWnDJFOq+mO3hnGntvF4kgwCod3so662jhnHDyCRh3scv8T/lZIA2MIiu7s703eIE6Wrcw xI1Wr6/4q9/akuUmVDSLgyAUw3hOABxI+3NMkKL27oaeuE7b027grAkwQyhYcJoKBBoIjL wWrgtvM6Vs1Uj2sMtqHOzHBpAZJqU6z16rk1lfOCSd2wZIS4jHqogX75HFvFOHlU2PQA7b jr529pm8ttKqI9jlV5rukG15JehvMpN+JhChsHVXm597RwVaZni1c9nSk0oThRxuPYF8+n nKyL0zVgA0vNlEyzPKG8U9fVsdrBsEb3KnCm5hoOOvWxOYpxWa0oXhzovn2duQ== 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 4WQrpz3Qj8zyw6; Sat, 20 Jul 2024 02:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46K2x7Cd024459; Sat, 20 Jul 2024 02:59:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46K2x7sA024456; Sat, 20 Jul 2024 02:59:07 GMT (envelope-from git) Date: Sat, 20 Jul 2024 02:59:07 GMT Message-Id: <202407200259.46K2x7sA024456@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: 148c173485ee - main - cam/iosched: Pass the transaction down we're collecting stats for 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: 148c173485eea8309e3c95db741686b3c71e83de Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=148c173485eea8309e3c95db741686b3c71e83de commit 148c173485eea8309e3c95db741686b3c71e83de Author: Warner Losh AuthorDate: 2024-07-20 02:52:50 +0000 Commit: Warner Losh CommitDate: 2024-07-20 02:53:37 +0000 cam/iosched: Pass the transaction down we're collecting stats for Pass the struct bio * down to the stats collection routines. This allows us to collect better stats and report more details. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46034 --- sys/cam/cam_iosched.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 022eb23cb621..330d5ea22b61 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -758,7 +758,7 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp) #ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, - sbintime_t sim_latency, int cmd, size_t size); + sbintime_t sim_latency, const struct bio *bp); #endif static inline bool @@ -1801,8 +1801,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, sim_latency = cam_iosched_sbintime_t(done_ccb->ccb_h.qos.periph_data); - cam_iosched_io_metric_update(isc, sim_latency, - bp->bio_cmd, bp->bio_bcount); + cam_iosched_io_metric_update(isc, sim_latency, bp); + /* * Debugging code: allow callbacks to the periph driver when latency max * is exceeded. This can be useful for triggering external debugging actions. @@ -1924,7 +1924,8 @@ static sbintime_t latencies[LAT_BUCKETS - 1] = { }; static void -cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) +cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, + const struct bio *bp __unused) { sbintime_t y, deltasq, delta; int i; @@ -2014,18 +2015,17 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, - sbintime_t sim_latency, int cmd, size_t size) + sbintime_t sim_latency, const struct bio *bp) { - /* xxx Do we need to scale based on the size of the I/O ? */ - switch (cmd) { + switch (bp->bio_cmd) { case BIO_READ: - cam_iosched_update(&isc->read_stats, sim_latency); + cam_iosched_update(&isc->read_stats, sim_latency, bp); break; case BIO_WRITE: - cam_iosched_update(&isc->write_stats, sim_latency); + cam_iosched_update(&isc->write_stats, sim_latency, bp); break; case BIO_DELETE: - cam_iosched_update(&isc->trim_stats, sim_latency); + cam_iosched_update(&isc->trim_stats, sim_latency, bp); break; default: break;