From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2AF23E0C70 for ; Wed, 20 May 2026 11:22:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779276137; cv=none; b=XyXdVQpRrfd3hUpJviQJvHm8MicIP6CBwdR6xVkjwkUyWCarC6CNigby/czjiYAMFLolP8T2f+yWVcUj/KLGiTGsYhi8HkFr2IY50Nqy5goouvcow2VXSFr6xFA9AlyeQVqNSrKSw8kMs07BBQ4Rv5Y81Pr14b95tbhKwr31EyY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779276137; c=relaxed/simple; bh=8QgipuGHnfsYhQUk65yez5TIfqh/PKGGcV1QMIA0SfI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=DVSpY0KlRXhmBhqphX83dGhFU1VH/IyUkH1d8TpOYfMDtoiE02Zcp7lhGlUSC7TJB0K+DDW13OYdZQcIXXmLhG02SatsNyVRYH+hFvGYX3Tv8bRP8IEeI+bge7KmSW9NhCZ0T78YGeMoK2bXOJqqSYg5If/NzknH/7CJvbVB7lw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=G7L8ItbR; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=rcXZzuPS; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G7L8ItbR"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="rcXZzuPS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779276134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=mPwOMoB8ht/87MdxXd74PQwxTtZ3qHGDKBpwO7djAzw=; b=G7L8ItbREc7jVFz5bI0YwL4BiOLRGONK7zuiJBoaOfp41u8KBBmPc+bHOn3Ko4zw7gO/rW LZORgX8m8QP2mz4lMLeqcXGecq7gt4NlcMdlfD5i9O0UPqPdz24c5vcF9P/YIdn6du3XIb pc5vonKnPMAUnt+5WM842tXefoFsbWw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-146-BAvmGTTpMHur5peLGSQGpA-1; Wed, 20 May 2026 07:22:13 -0400 X-MC-Unique: BAvmGTTpMHur5peLGSQGpA-1 X-Mimecast-MFC-AGG-ID: BAvmGTTpMHur5peLGSQGpA_1779276132 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-48a589c7879so37571345e9.1 for ; Wed, 20 May 2026 04:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779276132; x=1779880932; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=mPwOMoB8ht/87MdxXd74PQwxTtZ3qHGDKBpwO7djAzw=; b=rcXZzuPSAosbYGHuUeFPIcb2OS6IFToTYqsl9Bx3RmPo2ormc43apmKsXgpLd+nXhR HIDwfe+71xW/ioJ3vtD4dWLK9FbBBIZUMspDUJSEWeqOrX/udZ4ASDC+5DWFtlD3sb/f 2rbwl6vaRZT5oeHxlD0Ybxy0TE4n0PGy9SE37OdGwTjarL6GDCQeiUMh2a4fcfhXGKF9 mpZ3r5PcR90kgqtJYUl2DL8EuXFu5aP8Bt8ru76yTYthZyUHbS8smG/fQVjL79GibW+c BgHlTE839DpiK23/yGrxsfRPfBBVtdgtVoseo9ZlDnEsgeANsuOz07n4RDlKi02Jvdcg 0daQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779276132; x=1779880932; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mPwOMoB8ht/87MdxXd74PQwxTtZ3qHGDKBpwO7djAzw=; b=R+TppR75fi7X1PxjaozceIeIz+QFsaOjlMIU0nkp+70UWLcuYUiuKRVBrAprUkJ0h6 j6kw0f9fqd6j2Ej4+7Dp61V+M2gPszPGY5rLYkCK3dqrWb1zKiBQWTqCDUP86kX1W8P1 9SygNr3CInFVaCv5A4kezIBf8mEdRFoXwTPYjszBgKPbZEUYT7fdV/DM2P0L2BVeQbin ctafNFo9jruVO6alvvGuCh7IvS9erFXrvWeRIiBZWbL4d3WBOyYSl6IOClbGYfad53Jn g3rFvJeh3aHCw7X3Ri2HHoVOeQVIj96mLZ7RbQTpr8G6lQq5GohmHgdig9+yiso6B9Kg BcHw== X-Gm-Message-State: AOJu0YwHqT6Xrlx4rNrbYxvlpFbk7lnyPWD+nXx5S2r2UxpEnjCsAXb2 boZgYY9RzuVboU1oc4M5KmCK2puQxcB+jL0LohuMfJJGJRWXvCOdLAfcjOqNJ1fAi2RiBnoF0vI S6QBjQbumNRGqgaNghz+j5Yvq3KyqHmVSb9N6KWGJAUmkGIFv2xUrCFY/VTwnEx1tPg== X-Gm-Gg: Acq92OEIMeRtwRL+wPGvnDX1nTR/LQAcFeF8p/yo0xtQh1ZK8doxzlHOBR9eVYHxvZN zhjzzdCU0LswbHBWfL/2katiJ0osq2JlMei2lbt/OqR4scRgXljy2A/EAkvhgDWO9oLNU8CaIZJ G/z4gM0nRlNv028Cg6BpMDXxila/W6OxUBW6X9KtQbh7Td4q6Ki7RuhEArk9M6MmZSV+SMmq8eZ FX6cDBJftk/nqOD4iW7ubA5e67sfm2mTDVTUttW+T8VmSQTBPISHvhZDSeSYOcV6jDnCu3/5iuP VluyayEO3hrI8lXq8rXoj5KSRY2fivPtY9IuO65wwSlx1vzXEXCjyRC/bnqoMGF5OUCKfL+FhZl jHrDiIQzIMxCOnLY5ffRvo1oXPasn02sfhIwP0XL8xwmghZAfQbYY/TygyEfTI4V/Zu8muk+4s1 h83miJNIdrGlyqqmUDayn/qCW0Kw== X-Received: by 2002:a05:600c:83c7:b0:48f:e230:29f5 with SMTP id 5b1f17b1804b1-48fe53a8eccmr356807985e9.16.1779276131675; Wed, 20 May 2026 04:22:11 -0700 (PDT) X-Received: by 2002:a05:600c:83c7:b0:48f:e230:29f5 with SMTP id 5b1f17b1804b1-48fe53a8eccmr356807435e9.16.1779276131207; Wed, 20 May 2026 04:22:11 -0700 (PDT) Received: from gmonaco-thinkpadt14gen3.rmtit.csb (212-8-243-115.hosted-by-worldstream.net. [212.8.243.115]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0fe248dsm52513736f8f.30.2026.05.20.04.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 04:22:10 -0700 (PDT) Message-ID: <1d7268da9c74d99c84a83d7039e67a9f0da14d98.camel@redhat.com> Subject: Re: [PATCH 6/9] rv: Ensure synchronous cleanup for HA monitors From: Gabriele Monaco To: Wen Yang Cc: linux-kernel@vger.kernel.org, Steven Rostedt , Nam Cao , linux-trace-kernel@vger.kernel.org Date: Wed, 20 May 2026 13:22:09 +0200 In-Reply-To: <5f8ceba5-ec25-4c19-a74b-ed98715e89b6@linux.dev> References: <20260512140250.262190-1-gmonaco@redhat.com> <20260512140250.262190-7-gmonaco@redhat.com> <88a6fc5c08d18e3c1f6d29dc106db80fa688bf87.camel@redhat.com> <5f8ceba5-ec25-4c19-a74b-ed98715e89b6@linux.dev> Autocrypt: addr=gmonaco@redhat.com; prefer-encrypt=mutual; keydata=mDMEZuK5YxYJKwYBBAHaRw8BAQdAmJ3dM9Sz6/Hodu33Qrf8QH2bNeNbOikqYtxWFLVm0 1a0JEdhYnJpZWxlIE1vbmFjbyA8Z21vbmFjb0BrZXJuZWwub3JnPoiZBBMWCgBBFiEEysoR+AuB3R Zwp6j270psSVh4TfIFAmjKX2MCGwMFCQWjmoAFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgk Q70psSVh4TfIQuAD+JulczTN6l7oJjyroySU55Fbjdvo52xiYYlMjPG7dCTsBAMFI7dSL5zg98I+8 cXY1J7kyNsY6/dcipqBM4RMaxXsOtCRHYWJyaWVsZSBNb25hY28gPGdtb25hY29AcmVkaGF0LmNvb T6InAQTFgoARAIbAwUJBaOagAULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgBYhBMrKEfgLgd0WcK eo9u9KbElYeE3yBQJoymCyAhkBAAoJEO9KbElYeE3yjX4BAJ/ETNnlHn8OjZPT77xGmal9kbT1bC1 7DfrYVISWV2Y1AP9HdAMhWNAvtCtN2S1beYjNybuK6IzWYcFfeOV+OBWRDQ== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.1 (3.60.1-1.fc44) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2026-05-20 at 00:48 +0800, Wen Yang wrote: > The goal is right.=C2=A0 One thing worth double-checking is the load orde= r > in the callback against the "SMP BARRIER PAIRING" section of > Documentation/memory-barriers.txt, which states: >=20 Yeah I realised that after I sent my answer.. You might have noticed but I proposed a version using acquire/release semantics in [1]. I'm waiting to send it all in a V2 for the fixes series. Are you going to send your patch with tracepoint_synchronize_unregister() i= n the per-task destruction (can be a patch alone)? If not I'll do it myself and append that too, I prefer to have everything together to avoid conflict resolution issues. Thanks, Gabriele [1] - https://lore.kernel.org/lkml/02c522f2a09183c9e1a6ff5b0110d0d5cc5e35bd.camel= @redhat.com/ > =C2=A0=C2=A0 [!] Note that the stores before the write barrier would norm= ally be > =C2=A0=C2=A0 expected to match the loads after the read barrier or the > =C2=A0=C2=A0 address-dependency barrier, and vice versa ... >=20 > So, we should to swap the read order in the callback so that it matches > the standard pattern: >=20 > =C2=A0=C2=A0 void __ha_monitor_timer_callback() { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 guard(rcu)(); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 curr_state =3D READ_ONCE= (ha_mon->da_mon.curr_state);=C2=A0 /* B:=20 > before rmb */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 smp_rmb(); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (unlikely(!da_monitor= ing(&ha_mon->da_mon)))=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* A:=20 > after rmb */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 return; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * Reached here: mo= nitoring =3D 1 (old_A). > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * Standard wmb/rmb= guarantee: curr_state (read before rmb) is also > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * old, i.e. not in= itial_state. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ha_react(curr_state, EVE= NT_NONE, env_string.buffer); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... > =C2=A0=C2=A0 } >=20 > =C2=A0=C2=A0 void da_monitor_reset() { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 da_monitor_reset_hook(da= _mon); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 WRITE_ONCE(da_mon->monit= oring, 0);=C2=A0=C2=A0 /* A: before wmb */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 smp_wmb(); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 WRITE_ONCE(da_mon->curr_= state, model_get_initial_state());=C2=A0 /*=20 > B: after wmb */ > =C2=A0=C2=A0 } >=20 >=20 >=20 > -- > Best wishes, > Wen >=20 > >=20 > > [1] - > > https://lore.kernel.org/lkml/8af5ba4bd93d2acb8a546e8e47ced974a87c1eb8.1= 778522945.git.wen.yang@linux.dev > >=20 > > >=20 > > >=20 > > > -- > > > Best wishes, > > > Wen > > >=20 > > >=20 > > > On 5/12/26 22:02, Gabriele Monaco wrote: > > > > HA monitors may start timers, all cleanup functions currently stop = the > > > > timers asynchronously to avoid sleeping in the wrong context. > > > > Nothing makes sure running callbacks terminate on cleanup. > > > >=20 > > > > Run the entire HA timer callback in an RCU read-side critical secti= on, > > > > this way we can simply synchronize_rcu() with any pending timer and= are > > > > sure any cleanup using kfree_rcu() runs after callbacks terminated. > > > > Additionally make sure any unlikely callback running late won't run= any > > > > code if the monitor is marked as disabled. > > > >=20 > > > > Fixes: f5587d1b6ec9 ("rv: Add Hybrid Automata monitor type") > > > > Fixes: 4a24127bd6cb ("rv: Add support for per-object monitors in DA= /HA") > > > > Signed-off-by: Gabriele Monaco > > > > --- > > > > =C2=A0=C2=A0 include/rv/da_monitor.h | 23 +++++++++++++++++++---- > > > > =C2=A0=C2=A0 include/rv/ha_monitor.h | 18 ++++++++++++++++-- > > > > =C2=A0=C2=A0 2 files changed, 35 insertions(+), 6 deletions(-) > > > >=20 > > > > diff --git a/include/rv/da_monitor.h b/include/rv/da_monitor.h > > > > index a4a13b62d1a4..402d3b935c08 100644 > > > > --- a/include/rv/da_monitor.h > > > > +++ b/include/rv/da_monitor.h > > > > @@ -57,6 +57,15 @@ static struct rv_monitor rv_this; > > > > =C2=A0=C2=A0 #define da_monitor_reset_hook(da_mon) > > > > =C2=A0=C2=A0 #endif > > > > =C2=A0=C2=A0=20 > > > > +/* > > > > + * Hook to allow the implementation of hybrid automata: define it = with > > > > a > > > > + * function that waits for the termination of all monitors backgro= und > > > > + * activities (e.g. all timers). This hook can sleep. > > > > + */ > > > > +#ifndef da_monitor_sync_hook > > > > +#define da_monitor_sync_hook() > > > > +#endif > > > > + > > > > =C2=A0=C2=A0 /* > > > > =C2=A0=C2=A0=C2=A0 * Type for the target id, default to int but can= be overridden. > > > > =C2=A0=C2=A0=C2=A0 * A long type can work as hash table key (PER_OB= J) but will be > > > > downgraded > > > > to > > > > @@ -179,6 +188,7 @@ static inline int da_monitor_init(void) > > > > =C2=A0=C2=A0 static inline void da_monitor_destroy(void) > > > > =C2=A0=C2=A0 { > > > > =C2=A0=C2=A0=C2=A0 da_monitor_reset_all(); > > > > + da_monitor_sync_hook(); > > > > =C2=A0=C2=A0 } > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0 #ifndef da_implicit_guard > > > > @@ -232,6 +242,7 @@ static inline int da_monitor_init(void) > > > > =C2=A0=C2=A0 static inline void da_monitor_destroy(void) > > > > =C2=A0=C2=A0 { > > > > =C2=A0=C2=A0=C2=A0 da_monitor_reset_all(); > > > > + da_monitor_sync_hook(); > > > > =C2=A0=C2=A0 } > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0 #ifndef da_implicit_guard > > > > @@ -319,6 +330,7 @@ static inline void da_monitor_destroy(void) > > > > =C2=A0=C2=A0=C2=A0 } > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0=C2=A0 da_monitor_reset_all(); > > > > + da_monitor_sync_hook(); > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0=C2=A0 rv_put_task_monitor_slot(task_mon_slot); > > > > =C2=A0=C2=A0=C2=A0 task_mon_slot =3D RV_PER_TASK_MONITOR_INIT; > > > > @@ -497,10 +509,9 @@ static void da_monitor_reset_all(void) > > > > =C2=A0=C2=A0=C2=A0 struct da_monitor_storage *mon_storage; > > > > =C2=A0=C2=A0=C2=A0 int bkt; > > > > =C2=A0=C2=A0=20 > > > > - rcu_read_lock(); > > > > + guard(rcu)(); > > > > =C2=A0=C2=A0=C2=A0 hash_for_each_rcu(da_monitor_ht, bkt, mon_storag= e, node) > > > > =C2=A0=C2=A0=C2=A0 da_monitor_reset(&mon_storage->rv.da_mon); > > > > - rcu_read_unlock(); > > > > =C2=A0=C2=A0 } > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0 static inline int da_monitor_init(void) > > > > @@ -516,13 +527,17 @@ static inline void da_monitor_destroy(void) > > > > =C2=A0=C2=A0=C2=A0 int bkt; > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0=C2=A0 tracepoint_synchronize_unregister(); > > > > + scoped_guard(rcu) { > > > > + hash_for_each_rcu(da_monitor_ht, bkt, mon_storage, > > > > node) { > > > > + da_monitor_reset_hook(&mon_storage->rv.da_mon); > > > > + } > > > > + } > > > > + da_monitor_sync_hook(); > > > > =C2=A0=C2=A0=C2=A0 /* > > > > =C2=A0=C2=A0=C2=A0 * This function is called after all probes are = disabled and no > > > > longer > > > > =C2=A0=C2=A0=C2=A0 * pending, we can safely assume no concurrent u= ser. > > > > =C2=A0=C2=A0=C2=A0 */ > > > > - synchronize_rcu(); > > > > =C2=A0=C2=A0=C2=A0 hash_for_each_safe(da_monitor_ht, bkt, tmp, mon_= storage, node) > > > > { > > > > - da_monitor_reset_hook(&mon_storage->rv.da_mon); > > > > =C2=A0=C2=A0=C2=A0 hash_del_rcu(&mon_storage->node); > > > > =C2=A0=C2=A0=C2=A0 kfree(mon_storage); > > > > =C2=A0=C2=A0=C2=A0 } > > > > diff --git a/include/rv/ha_monitor.h b/include/rv/ha_monitor.h > > > > index d59507e8cb30..47ff1a41febe 100644 > > > > --- a/include/rv/ha_monitor.h > > > > +++ b/include/rv/ha_monitor.h > > > > @@ -36,6 +36,7 @@ static bool ha_monitor_handle_constraint(struct > > > > da_monitor > > > > *da_mon, > > > > =C2=A0=C2=A0 #define da_monitor_event_hook ha_monitor_handle_constr= aint > > > > =C2=A0=C2=A0 #define da_monitor_init_hook ha_monitor_init_env > > > > =C2=A0=C2=A0 #define da_monitor_reset_hook ha_monitor_reset_env > > > > +#define da_monitor_sync_hook() synchronize_rcu() > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0 #include > > > > =C2=A0=C2=A0 #include > > > > @@ -237,12 +238,25 @@ static bool ha_monitor_handle_constraint(stru= ct > > > > da_monitor *da_mon, > > > > =C2=A0=C2=A0=C2=A0 return false; > > > > =C2=A0=C2=A0 } > > > > =C2=A0=C2=A0=20 > > > > +/* > > > > + * __ha_monitor_timer_callback - generic callback representation > > > > + * > > > > + * This callback runs in an RCU read-side critical section to allo= w the > > > > + * destruction sequence to easily synchronize_rcu() with all pendi= ng > > > > timer > > > > + * after asynchronously disabling them. > > > > + */ > > > > =C2=A0=C2=A0 static inline void __ha_monitor_timer_callback(struct = ha_monitor > > > > *ha_mon) > > > > =C2=A0=C2=A0 { > > > > - enum states curr_state =3D READ_ONCE(ha_mon->da_mon.curr_state); > > > > =C2=A0=C2=A0=C2=A0 DECLARE_SEQ_BUF(env_string, ENV_BUFFER_SIZE); > > > > - u64 time_ns =3D ha_get_ns(); > > > > + enum states curr_state; > > > > + u64 time_ns; > > > > + > > > > + if (unlikely(!da_monitor_handling_event(&ha_mon->da_mon))) > > > > + return; > > > > =C2=A0=C2=A0=20 > > > > + guard(rcu)(); > > > > + curr_state =3D READ_ONCE(ha_mon->da_mon.curr_state); > > > > + time_ns =3D ha_get_ns(); > > > > =C2=A0=C2=A0=C2=A0 ha_get_env_string(&env_string, ha_mon, time_ns); > > > > =C2=A0=C2=A0=C2=A0 ha_react(curr_state, EVENT_NONE, env_string.buff= er); > > > > =C2=A0=C2=A0=C2=A0 ha_trace_error_env(ha_mon, model_get_state_name(= curr_state), > >=20