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>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000002cc345060b4bf37d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2023 at 8:07=E2=80=AFAM 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=3D1cfd01111eb6a28ca5043e928aa8e90= 99064177a > 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, onl= y > 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 mute= x. > 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 --0000000000002cc345060b4bf37d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 29, 2023 at 8:07=E2=80=AF= AM Gleb Smirnoff <<a href=3D"mailto:glebius@freebsd.org">glebius@freebsd= .org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">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=3D"https://cgit.FreeBSD.org/src/commit/?id=3D1cfd01111eb= 6a28ca5043e928aa8e9099064177a" rel=3D"noreferrer" target=3D"_blank">https:/= /cgit.FreeBSD.org/src/commit/?id=3D1cfd01111eb6a28ca5043e928aa8e9099064177a= </a><br> W> <br> W> commit 1cfd01111eb6a28ca5043e928aa8e9099064177a<br> W> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> W> AuthorDate: 2023-11-29 01:49:24 +0000<br> W> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> W> CommitDate: 2023-11-29 01:49:24 +0000<br> W> <br> W>=C2=A0 =C2=A0 =C2=A0mpi3mr: Only set callout_owned when we create a ti= meout<br> W>=C2=A0 =C2=A0 =C2=A0<br> W>=C2=A0 =C2=A0 =C2=A0Since we assume there's a timeout to cancel wh= en this is true, only set<br> W>=C2=A0 =C2=A0 =C2=A0it true when we set the timeout. Otherwise we may = try to cancel a timeout<br> W>=C2=A0 =C2=A0 =C2=A0when there's been an error in submission.<br> <br> IMHO, better use callout_active() instead of external flag.=C2=A0 Also, if = I remember well<br> doing callout_stop() on a stopped callout is completely safe, so other opti= on 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 rig= ht mutex.=C2=A0 Maybe I did that in a later patch...</div><div><br></div><d= iv>Warner <br></div></div></div> --0000000000002cc345060b4bf37d--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoi13=Ad19j=wKS4sJuy2k4DyR7PcDjFRMrN0UAjcMoeg>