[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP4=nvSHeGEmP6sLBLK==pwEHw4SnvFOhVYiSnWC-DYBPoepfg@mail.gmail.com>
Date: Tue, 16 Sep 2025 15:15:03 +0200
From: Tomas Glozar <tglozar@...hat.com>
To: Wander Lairson Costa <wander@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
"open list:Real-time Linux Analysis (RTLA) tools" <linux-trace-kernel@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>, John Kacur <jkacur@...hat.com>,
Luis Goncalves <lgoncalv@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Chang Yin <cyin@...hat.com>,
Costa Shulyupin <costa.shul@...hat.com>, Crystal Wood <crwood@...hat.com>,
Gabriele Monaco <gmonaco@...hat.com>
Subject: Re: [PATCH v2] rtla/actions: Fix condition for buffer reallocation
po 15. 9. 2025 v 20:11 odesÃlatel Wander Lairson Costa
<wander@...hat.com> napsal:
>
> The condition to check if the actions buffer needs to be resized was
> incorrect. The check `self->size >= self->len` would evaluate to
> true on almost every call to `actions_new()`, causing the buffer to
> be reallocated unnecessarily each time an action was added.
>
> Fix the condition to `self->len >= self.size`, ensuring
> that the buffer is only resized when it is actually full.
>
> Fixes: 6ea082b171e00 ("rtla/timerlat: Add action on threshold feature")
> Signed-off-by: Wander Lairson Costa <wander@...hat.com>
>
The blame goes entirely on me for getting confused by my own naming of
the fields. Thank you.
Reviewed-by: Tomas Glozar <tglozar@...hat.com>
Tomas
Powered by blists - more mailing lists