From nobody Fri Jan 07 19:32:16 2022 X-Original-To: dev-commits-src-main@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 C598D193BC62; Fri, 7 Jan 2022 19:32:16 +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 4JVtdr3BxDz4rXX; Fri, 7 Jan 2022 19:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4D97C115DB; Fri, 7 Jan 2022 19:32:16 +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 207JWGjJ015105; Fri, 7 Jan 2022 19:32:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 207JWG0O015104; Fri, 7 Jan 2022 19:32:16 GMT (envelope-from git) Date: Fri, 7 Jan 2022 19:32:16 GMT Message-Id: <202201071932.207JWG0O015104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: f4d499fd6702 - main - CTL: Relax callouts precisions. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: f4d499fd670283ee09f8870088c1b394843ae468 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641583936; 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=0AU9pASVkT5H5d8b01iUIogStmj3iLIOpkHCOYJTioE=; b=cnFSVSmk1ydXYd5CGjTcBox7ixhVRjo7xzZMiy9wPNHSSo8e2gjsos2ApfGZBA5C2+jN7U mvFKNPbR0ZjLEVb8Mcvbzsa1fMt0JSp0drnOUwGn2F+Cq1N+jOzve93ryLss+zTxZ/n0k0 L2PqOkxGvYNqloQkJJuY7elLIobHmg5eNoJ5bjTeVj+dR8woDUhflnBI7NINZ+hUqV7wJL rTghnalAG+OpNPrezAISHbTWe35p32ZQzI9j6haw7gCsQ75+tzIkqtoSSR4wcjn06TElR3 USRpf10fSw8yerxWzdxgN685WGJ7urVQz8de6HtVskUEEXOnicx0+wHc2XOZGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641583936; a=rsa-sha256; cv=none; b=M2skuw7noYxh0UY1SdXfTjUwpcKCOcF/1zafyNehKWnJooYL49apWyIybzZknbALcq+p5M pZR5NTcrYoYozyvEQMQLB80TEKqrXybi2GVM8aP8X3FuKnotZ8OliAzwpV1aaJEE1nAU1M mC9+wjvIIOSz+VRYf8fe9amhC4f2qV28DjzlLT7qvG15C0mF6kPxMfqL87Qy6vvpPKYJN2 l5dCFp2F/33TfWTG9fqiXX93tu15rGsqtnn8cUYF/wX7CQY3730RtxHenZnYxTgh+v5ptb e8GGo2KRn1N+mwyJk6MyrU85sj2yLiYltmUA/xZdKX/67K6INTD91q67xxFB3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=f4d499fd670283ee09f8870088c1b394843ae468 commit f4d499fd670283ee09f8870088c1b394843ae468 Author: Alexander Motin AuthorDate: 2022-01-07 19:30:44 +0000 Commit: Alexander Motin CommitDate: 2022-01-07 19:30:44 +0000 CTL: Relax callouts precisions. MFC after: 2 weeks --- 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 069b01cc04b1..7b2c73693f9c 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