From nobody Wed Nov 29 15:11:24 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 4SgN860QWfz52qVb for ; Wed, 29 Nov 2023 15:11:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SgN852njMz4YmG for ; Wed, 29 Nov 2023 15:11:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-54be88056c2so475866a12.1 for ; Wed, 29 Nov 2023 07:11:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1701270690; x=1701875490; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0WWnnMubiyJVhhSgI4pwqchObKefgdBTBmORsZ+4eHU=; b=2qmCv8/X0iZcDBNfHfnthDbmjGsdg7ukFiV9gczG3FfVVfKZIWurq7AQG3KAe8WX/y 6DE624qrEqUgjtb3n6JWS3bfqUPYcEvHZwEZNjE94T7TbkD+2J9AIFNKVsNqxCcnO8jG qg1h57cJm2bIttsiQ0HJt0N3ivtOqE5YdxwrF+GX1S+hnfmrYGu/McidE9PV4BqioO4P HbNAwcLmRaXDrgaNy2BIfI/kcP22/1VsyY6AwxJ/2y2YhC0HoepbxgA10/NaCZHI0XkY WIKUU1VrLTwqklc3kYmZiOvap2lhawiEhOxWTeWfrulRpHVs01pi+BkFeZFC/Zl4ESjP Ig7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701270690; x=1701875490; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0WWnnMubiyJVhhSgI4pwqchObKefgdBTBmORsZ+4eHU=; b=iZZyYhiA+mjvW2QvScCpndjGjCSlcSSocFj345A9Qj+DJmqFRjtS032K3rSxs/EiBO jra6+KAdUEJp6xgqx7R0pCcMTEd2vlhdkhxlRgt4Tl3giKR2Ahs47zm29+MtDGZPE+b0 tMJE/HZnTCv0g6oLDQPySAofwrU2010L7YSmLP6+8o2XjrMsn7JezF4/GOLvBo2wb8/P JOFqc3QuTMW1nD3NCpnL2iupVJnsc+IcV/TqaQIqY7bf7mHMyh3ieQH7K18yhsrkwzL3 LCF/GNUuduWB0565Zw38Fv6WoUyOHfBRV+lAskDynpnA1e2m1Tso7h1bBbUTJ0TamKsk 4dBw== X-Gm-Message-State: AOJu0Yz2mWGisjGGua/lhh/SzMsiI38kp/XjM50egM62sHWkj9nTvFv/ gARumAfqjo2SEFkt7mADcwA+d9jT76hUeDa5dWnMzg== X-Google-Smtp-Source: AGHT+IH6yDUQVmgZMLpZN6Vu7+a+G7BzR6EtlXlmg7DhC0N9pA5HZH1m+npf7ScckS17c8A7JadH9daJSDeuAq7xPWY= X-Received: by 2002:a17:907:7203:b0:a01:9985:30d9 with SMTP id dr3-20020a170907720300b00a01998530d9mr14335995ejc.12.1701270690507; Wed, 29 Nov 2023 07:11:30 -0800 (PST) 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 References: <202311290155.3AT1tYdx064353@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 29 Nov 2023 08:11:24 -0700 Message-ID: Subject: Re: git: 1cfd01111eb6 - main - mpi3mr: Only set callout_owned when we create a timeout To: Gleb Smirnoff Cc: Warner Losh , mav@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000002cc345060b4bf37d" 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:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SgN852njMz4YmG --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 = 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 > 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, 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


=
On Wed, Nov 29, 2023 at 8:07=E2=80=AF= 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=3D1cfd01111eb6a28ca5043e928aa8e9099064177a=
W>
W> commit 1cfd01111eb6a28ca5043e928aa8e9099064177a
W> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
W> AuthorDate: 2023-11-29 01:49:24 +0000
W> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
W> CommitDate: 2023-11-29 01:49:24 +0000
W>
W>=C2=A0 =C2=A0 =C2=A0mpi3mr: Only set callout_owned when we create a ti= meout
W>=C2=A0 =C2=A0 =C2=A0
W>=C2=A0 =C2=A0 =C2=A0Since we assume there's a timeout to cancel wh= en this is true, only set
W>=C2=A0 =C2=A0 =C2=A0it true when we set the timeout. Otherwise we may = try to cancel a timeout
W>=C2=A0 =C2=A0 =C2=A0when there's been an error in submission.

IMHO, better use callout_active() instead of external flag.=C2=A0 Also, if = I remember well
doing callout_stop() on a stopped callout is completely safe, so other opti= on 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 rig= ht mutex.=C2=A0 Maybe I did that in a later patch...

Warner
--0000000000002cc345060b4bf37d--