From nobody Wed Nov 29 15:07:03 2023 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 4SgN3272Tcz52q6c; Wed, 29 Nov 2023 15:07:10 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4SgN3252y6z4Y4n; Wed, 29 Nov 2023 15:07:10 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: by glebi.us (Postfix, from userid 1000) id A87ED72115; Wed, 29 Nov 2023 07:07:03 -0800 (PST) Date: Wed, 29 Nov 2023 07:07:03 -0800 From: Gleb Smirnoff To: Warner Losh , mav@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1cfd01111eb6 - main - mpi3mr: Only set callout_owned when we create a timeout Message-ID: References: <202311290155.3AT1tYdx064353@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202311290155.3AT1tYdx064353@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-Rspamd-Queue-Id: 4SgN3252y6z4Y4n On Wed, Nov 29, 2023 at 01:55:34AM +0000, Warner Losh wrote: W> The branch main has been updated by imp: W> W> URL: https://cgit.FreeBSD.org/src/commit/?id=1cfd01111eb6a28ca5043e928aa8e9099064177a W> W> commit 1cfd01111eb6a28ca5043e928aa8e9099064177a W> Author: Warner Losh W> AuthorDate: 2023-11-29 01:49:24 +0000 W> Commit: Warner Losh W> CommitDate: 2023-11-29 01:49:24 +0000 W> W> mpi3mr: Only set callout_owned when we create a timeout W> W> Since we assume there's a timeout to cancel when this is true, only set W> it true when we set the timeout. Otherwise we may try to cancel a timeout W> when there's been an error in submission. IMHO, better use callout_active() instead of external flag. Also, if I remember well doing callout_stop() on a stopped callout is completely safe, so other option is skip the check. What really needs to be done is to associate callout with the driver mutex. -- Gleb Smirnoff