From nobody Fri Jan 21 01:59:40 2022 X-Original-To: dev-commits-src-branches@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 87A5E1955DC9; Fri, 21 Jan 2022 01:59: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 4Jg2cs2l5Vz4ccy; Fri, 21 Jan 2022 01:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642730381; 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=vUS4LJCmVIvK5+u2aHTPmQtl06JXD5IqQel8lPFv+RI=; b=iPGde0kw2Xk4fYEIY/Q/m0nyk4DNKM6jFcGH8xwYBvNHUzqIWmEj+hIa/1Mzi4MJccaEhI qUR1DWUAPyDULRBdk+wfD0vhvtVWDvUUx3NTeT0MEPFll5UhYUZ7Ry+i5otTq25z7WzPj2 RVxGImkSUfV8bpyozou+cilKNSL9BK86su7xnQrvFjBZNOWiJU1VKQdUOvAtXrvtD1wdu+ XQLn9R5WjRzOaM2L26YBVxGj4lSY5KS0FmqLEcy+RRltEkXb3eumSIUVu+oVzZzV1RRlkk Js92GH9gJLnibDjjmyY7FTkl0WEEoT7bx01zxCbv+UJh+IjVNx3W7zJgMou3Eg== 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 1727C1347E; Fri, 21 Jan 2022 01:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20L1xerW060753; Fri, 21 Jan 2022 01:59:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20L1xe7J060752; Fri, 21 Jan 2022 01:59:40 GMT (envelope-from git) Date: Fri, 21 Jan 2022 01:59:40 GMT Message-Id: <202201210159.20L1xe7J060752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 9a45d8894662 - stable/13 - CTL: Relax callouts precisions. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9a45d88946629e2fbebe7deb9f74204e455a0364 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642730381; 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=vUS4LJCmVIvK5+u2aHTPmQtl06JXD5IqQel8lPFv+RI=; b=lGGIE/aDLEOc34z7Wa6/5joRzAjDIOFhoTfpFyTQqGfdgPpgSRZQ0oR3rKW4kL+gFC6h3H 1vhC+SR+mGX2VaZo7kOUZpTg7qhq2arybebqhshQygeGHUPRjLdeoLMyVfcIKw/AREmAVm ExjrpckJp6mvQ9tOikIcW3ij/7e9h4898Co0lZo8YyrMOnZ78eKGH15yPWG3swQl3jFFV4 dpZbjY4GPw/ABKHPKVtFxD9EDS628pKHVa2uDYpd+jUB5zyAsPEKJmMNCaQwgPWXrvRZ3C Ws2nH62EAy8S1VYp7OG+mHapTgVHjugYK1a9ShsyONX7ZsKoeIH2oR2YCJODnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642730381; a=rsa-sha256; cv=none; b=LpUqJZnUa5KRjqc1G/rUUQJNVozOPchi9gB3N/S3OFirjuEECOqrjNaS7Qf4mArGWdk2r5 tFP+F5R6SiYxGHHOMxbxyOWOV7FTOsOyrbIE4N1fcaXXwPRfZt2Zw7bfNrc3zDYYVPae7z oKJGyasnDdiHxnjYnQRQm4jLQ9rusNWE+fQJrOnDFNkcQwjBqaRwJgYapRpDiy+R6wuuZA 6V/FBG51niMjrvY7eXg3t8qKdw3kO60Xg1h1m8hEg6Sv975ZnxIHN3yYb68zdSaIypSGVV po6bL1m0ow48i/Or7TL15kQZUH2ub/PcjWVTLmhtjxC8GllA9hy1zAFglR5Urg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=9a45d88946629e2fbebe7deb9f74204e455a0364 commit 9a45d88946629e2fbebe7deb9f74204e455a0364 Author: Alexander Motin AuthorDate: 2022-01-07 19:30:44 +0000 Commit: Alexander Motin CommitDate: 2022-01-21 01:59:34 +0000 CTL: Relax callouts precisions. MFC after: 2 weeks (cherry picked from commit f4d499fd670283ee09f8870088c1b394843ae468) --- sys/cam/ctl/ctl.c | 7 ++++--- sys/cam/ctl/ctl_tpc.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 980328c1551f..47176a5cb981 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -5903,7 +5903,8 @@ ctl_ie_timer(void *arg) t = scsi_4btoul(lun->MODE_IE.interval_timer); if (t == 0 || t == UINT32_MAX) t = 3000; /* 5 min */ - callout_schedule(&lun->ie_callout, t * hz / 10); + callout_schedule(&lun->ie_callout, SBT_1S / 10 * t, + SBT_1S / 10, 0); } } @@ -5935,8 +5936,8 @@ ctl_ie_page_handler(struct ctl_scsiio *ctsio, t = scsi_4btoul(pg->interval_timer); if (t == 0 || t == UINT32_MAX) t = 3000; /* 5 min */ - callout_reset(&lun->ie_callout, t * hz / 10, - ctl_ie_timer, lun); + callout_reset_sbt(&lun->ie_callout, SBT_1S / 10 * t, + SBT_1S / 10, ctl_ie_timer, lun, 0); } } else { lun->ie_asc = 0; diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c index 60cd5611643d..66ac2a1023e9 100644 --- a/sys/cam/ctl/ctl_tpc.c +++ b/sys/cam/ctl/ctl_tpc.c @@ -187,7 +187,7 @@ tpc_timeout(void *arg) free(token, M_CTL); } mtx_unlock(&softc->tpc_lock); - callout_schedule(&softc->tpc_timeout, hz); + callout_schedule_sbt(&softc->tpc_timeout, SBT_1S, SBT_1S, 0); } void @@ -197,7 +197,8 @@ ctl_tpc_init(struct ctl_softc *softc) mtx_init(&softc->tpc_lock, "CTL TPC mutex", NULL, MTX_DEF); TAILQ_INIT(&softc->tpc_tokens); callout_init_mtx(&softc->tpc_timeout, &softc->ctl_lock, 0); - callout_reset(&softc->tpc_timeout, hz, tpc_timeout, softc); + callout_reset_sbt(&softc->tpc_timeout, SBT_1S, SBT_1S, + tpc_timeout, softc, 0); } void