Date: Wed, 29 Nov 2023 08:11:24 -0700 From: Warner Losh <imp@bsdimp.com> To: Gleb Smirnoff <glebius@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, mav@freebsd.org, 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: <CANCZdfoi13=Ad19j=wKS4sJuy2k4DyR7PcDjFRMrN0UAjcMoeg@mail.gmail.com> In-Reply-To: <ZWdTl7j9jbub24We@FreeBSD.org> References: <202311290155.3AT1tYdx064353@gitrepo.freebsd.org> <ZWdTl7j9jbub24We@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Wed, Nov 29, 2023 at 8:07 AM Gleb Smirnoff <glebius@freebsd.org> wrote: > 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 <imp@FreeBSD.org> > W> AuthorDate: 2023-11-29 01:49:24 +0000 > W> Commit: Warner Losh <imp@FreeBSD.org> > 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. > I thought I'd removed the bool and always cancelled. It's already kinda associated with the right mutex. Maybe I did that in a later patch... Warner [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 29, 2023 at 8:07 AM Gleb Smirnoff <<a href="mailto:glebius@freebsd.org">glebius@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Nov 29, 2023 at 01:55:34AM +0000, Warner Losh wrote:<br> W> The branch main has been updated by imp:<br> W> <br> W> URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=1cfd01111eb6a28ca5043e928aa8e9099064177a" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=1cfd01111eb6a28ca5043e928aa8e9099064177a</a><br> W> <br> W> commit 1cfd01111eb6a28ca5043e928aa8e9099064177a<br> W> Author: Warner Losh <imp@FreeBSD.org><br> W> AuthorDate: 2023-11-29 01:49:24 +0000<br> W> Commit: Warner Losh <imp@FreeBSD.org><br> W> CommitDate: 2023-11-29 01:49:24 +0000<br> W> <br> W> mpi3mr: Only set callout_owned when we create a timeout<br> W> <br> W> Since we assume there's a timeout to cancel when this is true, only set<br> W> it true when we set the timeout. Otherwise we may try to cancel a timeout<br> W> when there's been an error in submission.<br> <br> IMHO, better use callout_active() instead of external flag. Also, if I remember well<br> doing callout_stop() on a stopped callout is completely safe, so other option is skip<br> the check.<br> <br> What really needs to be done is to associate callout with the driver mutex.<br></blockquote><div><br></div><div>I thought I'd removed the bool and always cancelled. It's already kinda associated</div><div>with the right mutex. Maybe I did that in a later patch...</div><div><br></div><div>Warner <br></div></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoi13=Ad19j=wKS4sJuy2k4DyR7PcDjFRMrN0UAjcMoeg>
