Re: [PATCH net-next v3 3/5] netconsole: allow configuring the rate limit interval through configfs
From: Gustavo Luiz Duarte
Date: Wed Sep 23 2026 - 11:50:42 EST
On Mon, Sep 14, 2026 at 1:10 PM Breno Leitao <leitao@xxxxxxxxxx> wrote:
>
> The per-target token bucket has no interface, so every target is still
> unlimited.
>
> Expose the interval as ratelimit_interval_ms through configfs. It
> defaults to zero, so a target stays unlimited until an administrator
> sets one.
>
> The write restarts the interval instead of only publishing the new
> value. A target is configured while it floods, by which point the
> bucket is empty, and ___ratelimit() only refills it once the interval
> it was set with has elapsed.
>
> Reject more than INT_MAX milliseconds. msecs_to_jiffies() saturates at
> MAX_JIFFY_OFFSET, which is below INT_MAX on 32-bit, so checking only
> the jiffies value would take a write there that a 64-bit kernel turns
> down.
>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
Reviewed-by: Gustavo Luiz Duarte <gustavold@xxxxxxxxx>