linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
@ 2023-04-13 16:47 Yixin Shen
  2023-04-13 17:19 ` Leon Romanovsky
  0 siblings, 1 reply; 7+ messages in thread
From: Yixin Shen @ 2023-04-13 16:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: rdunlap, akpm, netdev, davem, edumazet, ncardwell, Yixin Shen

This commit export the symbol of the function minmax_running_min
to make it accessible to dynamically loaded modules. It can make
this library more general, especially for those congestion
control algorithm modules who wants to implement a windowed min
filter.

Signed-off-by: Yixin Shen <bobankhshen@gmail.com>
---
 lib/win_minmax.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/win_minmax.c b/lib/win_minmax.c
index ec10506834b6..1682e614309c 100644
--- a/lib/win_minmax.c
+++ b/lib/win_minmax.c
@@ -97,3 +97,4 @@ u32 minmax_running_min(struct minmax *m, u32 win, u32 t, u32 meas)
 
 	return minmax_subwin_update(m, win, &val);
 }
+EXPORT_SYMBOL(minmax_running_min);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
  2023-04-13 16:47 [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min Yixin Shen
@ 2023-04-13 17:19 ` Leon Romanovsky
  2023-04-14  2:27   ` Yixin Shen
  0 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2023-04-13 17:19 UTC (permalink / raw)
  To: Yixin Shen
  Cc: linux-kernel, rdunlap, akpm, netdev, davem, edumazet, ncardwell

On Thu, Apr 13, 2023 at 04:47:26PM +0000, Yixin Shen wrote:
> This commit export the symbol of the function minmax_running_min
> to make it accessible to dynamically loaded modules. It can make
> this library more general, especially for those congestion
> control algorithm modules who wants to implement a windowed min
> filter.
> 
> Signed-off-by: Yixin Shen <bobankhshen@gmail.com>
> ---
>  lib/win_minmax.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/win_minmax.c b/lib/win_minmax.c
> index ec10506834b6..1682e614309c 100644
> --- a/lib/win_minmax.c
> +++ b/lib/win_minmax.c
> @@ -97,3 +97,4 @@ u32 minmax_running_min(struct minmax *m, u32 win, u32 t, u32 meas)
>  
>  	return minmax_subwin_update(m, win, &val);
>  }
> +EXPORT_SYMBOL(minmax_running_min);

Please provide in-tree kernel user for that EXPORT_SYMBOL.

Thanks

> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
  2023-04-13 17:19 ` Leon Romanovsky
@ 2023-04-14  2:27   ` Yixin Shen
  2023-04-14  9:00     ` Leon Romanovsky
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Yixin Shen @ 2023-04-14  2:27 UTC (permalink / raw)
  To: leon
  Cc: akpm, bobankhshen, davem, edumazet, linux-kernel, ncardwell,
	netdev, rdunlap

> Please provide in-tree kernel user for that EXPORT_SYMBOL.

It is hard to provide such an in-tree kernel user. We are trying to
implement newer congestion control algorithms as dynamically loaded modules.
For example, Copa(NSDI'18) which is adopted by Facebook needs to maintain
such windowed min filters. Althought it is true that we can just
copy-and-paste the code inside lib/win_minmax, it it more convenient to
give the same status of minmax_running_min as minmax_running_max.
It is confusing that only minmax_running_max is exported.
If this patch is rejected because the changes are too significant,
I can also understand.

Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
  2023-04-14  2:27   ` Yixin Shen
@ 2023-04-14  9:00     ` Leon Romanovsky
  2023-04-14 14:17     ` Eric Dumazet
  2023-04-14 15:07     ` Jakub Kicinski
  2 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2023-04-14  9:00 UTC (permalink / raw)
  To: Yixin Shen
  Cc: akpm, davem, edumazet, linux-kernel, ncardwell, netdev, rdunlap

On Fri, Apr 14, 2023 at 02:27:36AM +0000, Yixin Shen wrote:
> > Please provide in-tree kernel user for that EXPORT_SYMBOL.
> 
> It is hard to provide such an in-tree kernel user. 

So once you overcome it, feel free to send this EXPORT_SYMBOL patch
together with in-tree kernel user, but for now it is against kernel
policy.

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
  2023-04-14  2:27   ` Yixin Shen
  2023-04-14  9:00     ` Leon Romanovsky
@ 2023-04-14 14:17     ` Eric Dumazet
  2023-04-14 21:20       ` Andrew Morton
  2023-04-14 15:07     ` Jakub Kicinski
  2 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2023-04-14 14:17 UTC (permalink / raw)
  To: Yixin Shen; +Cc: leon, akpm, davem, linux-kernel, ncardwell, netdev, rdunlap

On Fri, Apr 14, 2023 at 4:27 AM Yixin Shen <bobankhshen@gmail.com> wrote:
>
> > Please provide in-tree kernel user for that EXPORT_SYMBOL.
>
> It is hard to provide such an in-tree kernel user. We are trying to
> implement newer congestion control algorithms as dynamically loaded modules.
> For example, Copa(NSDI'18) which is adopted by Facebook needs to maintain
> such windowed min filters. Althought it is true that we can just
> copy-and-paste the code inside lib/win_minmax, it it more convenient to
> give the same status of minmax_running_min as minmax_running_max.
> It is confusing that only minmax_running_max is exported.

This is needed by net/ipv4/tcp_bbr.c , which can be a module.

> If this patch is rejected because the changes are too significant,

Well, this path would soon be reverted by people using bots/tools to
detect unused functions,
or unused EXPORT symbols.

So there is no point accepting it, before you submit the CC in the
official linux tree.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
  2023-04-14  2:27   ` Yixin Shen
  2023-04-14  9:00     ` Leon Romanovsky
  2023-04-14 14:17     ` Eric Dumazet
@ 2023-04-14 15:07     ` Jakub Kicinski
  2 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2023-04-14 15:07 UTC (permalink / raw)
  To: netdev; +Cc: Yixin Shen, leon, akpm, davem, edumazet, linux-kernel, ncardwell

On Fri, 14 Apr 2023 02:27:36 +0000 Yixin Shen wrote:
> For example, Copa(NSDI'18) which is adopted by Facebook needs to maintain
> such windowed min filters.

Perhaps an unnecessary comment, but this should not be misread
as this patch itself having anything to do with Meta.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min
  2023-04-14 14:17     ` Eric Dumazet
@ 2023-04-14 21:20       ` Andrew Morton
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2023-04-14 21:20 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Yixin Shen, leon, davem, linux-kernel, ncardwell, netdev, rdunlap

On Fri, 14 Apr 2023 16:17:40 +0200 Eric Dumazet <edumazet@google.com> wrote:

> On Fri, Apr 14, 2023 at 4:27 AM Yixin Shen <bobankhshen@gmail.com> wrote:
> >
> > > Please provide in-tree kernel user for that EXPORT_SYMBOL.
> >
> > It is hard to provide such an in-tree kernel user. We are trying to
> > implement newer congestion control algorithms as dynamically loaded modules.
> > For example, Copa(NSDI'18) which is adopted by Facebook needs to maintain
> > such windowed min filters. Althought it is true that we can just
> > copy-and-paste the code inside lib/win_minmax, it it more convenient to
> > give the same status of minmax_running_min as minmax_running_max.
> > It is confusing that only minmax_running_max is exported.
> 
> This is needed by net/ipv4/tcp_bbr.c , which can be a module.
> 
> > If this patch is rejected because the changes are too significant,
> 
> Well, this path would soon be reverted by people using bots/tools to
> detect unused functions,
> or unused EXPORT symbols.
> 
> So there is no point accepting it, before you submit the CC in the
> official linux tree.

It seems pretty darn screwy that we export minmax_running_max() but not
minmax_running_min().

I'd be OK taking the patch just so we aren't pretty darn screwy.  But
it would be perfectly OK to include that one-liner within the patchset
which adds a minmax_running_min() user.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-14 21:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 16:47 [PATCH net-next] lib/win_minmax: export symbol of minmax_running_min Yixin Shen
2023-04-13 17:19 ` Leon Romanovsky
2023-04-14  2:27   ` Yixin Shen
2023-04-14  9:00     ` Leon Romanovsky
2023-04-14 14:17     ` Eric Dumazet
2023-04-14 21:20       ` Andrew Morton
2023-04-14 15:07     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).