[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZ6RqJ8e0sQPvaT_6dVOwisnHj6m+STgdnmLmmQxzV0+uHbvw@mail.gmail.com>
Date: Wed, 10 Mar 2021 03:00:43 +0900
From: Vincent MAILHOL <mailhol.vincent@...adoo.fr>
To: Marc Kleine-Budde <mkl@...gutronix.de>,
linux-can <linux-can@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Tom Herbert <therbert@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [RFC PATCH 1/1] dql: add dql_set_min_limit()
On Wed. 10 Mar 2021 at 00:23, Vincent Mailhol
<mailhol.vincent@...adoo.fr> wrote:
>
> Add a function to set the dynamic queue limit minimum value.
>
> This function is to be used by network drivers which are able to
> prove, at least through empirical tests, that they reach better
> performances with a specific predefined dql.min_limit value.
>
> Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>
> ---
> include/linux/dynamic_queue_limits.h | 3 +++
> lib/dynamic_queue_limits.c | 8 ++++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/include/linux/dynamic_queue_limits.h b/include/linux/dynamic_queue_limits.h
> index 407c2f281b64..32437f168a35 100644
> --- a/include/linux/dynamic_queue_limits.h
> +++ b/include/linux/dynamic_queue_limits.h
> @@ -103,6 +103,9 @@ void dql_reset(struct dql *dql);
> /* Initialize dql state */
> void dql_init(struct dql *dql, unsigned int hold_time);
>
> +/* Set the dql minimum limit */
> +void dql_set_min_limit(struct dql *dql, unsigned int min_limit);
> +
> #endif /* _KERNEL_ */
>
> #endif /* _LINUX_DQL_H */
> diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
> index fde0aa244148..8b6ad1e0a2e3 100644
> --- a/lib/dynamic_queue_limits.c
> +++ b/lib/dynamic_queue_limits.c
> @@ -136,3 +136,11 @@ void dql_init(struct dql *dql, unsigned int hold_time)
> dql_reset(dql);
> }
> EXPORT_SYMBOL(dql_init);
> +
> +void dql_set_min_limit(struct dql *dql, unsigned int min_limit)
> +{
> +#ifdef CONFIG_BQL
> + dql->min_limit = min_limit;
> +#endif
Marc pointed some issue on the #ifdef in a separate thread:
https://lore.kernel.org/linux-can/20210309153547.q7zspf46k6terxqv@pengutronix.de/
I will come back with a v2 tomorrow.
> +}
> +EXPORT_SYMBOL(dql_set_min_limit);
Powered by blists - more mailing lists