Re: Optimizing kernel compilation / alignments for network performance

2022-05-10 Thread Rafał Miłecki
On 6.05.2022 11:44, Arnd Bergmann wrote: On Fri, May 6, 2022 at 10:55 AM Rafał Miłecki wrote: On 6.05.2022 10:45, Arnd Bergmann wrote: On Fri, May 6, 2022 at 9:44 AM Rafał Miłecki wrote: With echo 1 > /sys/class/net/eth0/queues/rx-0/rps_cpus my NAT speeds were jumping between 2 speeds: 284

Re: Optimizing kernel compilation / alignments for network performance

2022-05-10 Thread Rafał Miłecki
On 6.05.2022 10:45, Arnd Bergmann wrote: On Fri, May 6, 2022 at 9:44 AM Rafał Miłecki wrote: On 5.05.2022 18:04, Andrew Lunn wrote: you'll see that most used functions are: v7_dma_inv_range __irqentry_text_end l2c210_inv_range v7_dma_clean_range bcma_host_soc_read32 __netif_receive_skb_core

Re: Optimizing kernel compilation / alignments for network performance

2022-05-10 Thread Rafał Miłecki
On 6.05.2022 14:42, Andrew Lunn wrote: I just took a quick look at the driver. It allocates and maps rx buffers that can cover a packet size of BGMAC_RX_MAX_FRAME_SIZE = 9724. This seems rather excessive, especially since most people are going to use a MTU of 1500. My proposal would be to add

Re: Optimizing kernel compilation / alignments for network performance

2022-05-08 Thread Rafał Miłecki
On 6.05.2022 09:44, Rafał Miłecki wrote: On 5.05.2022 18:04, Andrew Lunn wrote: you'll see that most used functions are: v7_dma_inv_range __irqentry_text_end l2c210_inv_range v7_dma_clean_range bcma_host_soc_read32 __netif_receive_skb_core arch_cpu_idle l2c210_clean_range fib_table_lookup

Re: Optimizing kernel compilation / alignments for network performance

2022-05-06 Thread Andrew Lunn
> > I just took a quick look at the driver. It allocates and maps rx buffers > > that can cover a packet size of BGMAC_RX_MAX_FRAME_SIZE = 9724. > > This seems rather excessive, especially since most people are going to use > > a MTU of 1500. > > My proposal would be to add support for making rx

Re: Optimizing kernel compilation / alignments for network performance

2022-05-06 Thread Rafał Miłecki
On 6.05.2022 10:45, Arnd Bergmann wrote: On Fri, May 6, 2022 at 9:44 AM Rafał Miłecki wrote: On 5.05.2022 18:04, Andrew Lunn wrote: you'll see that most used functions are: v7_dma_inv_range __irqentry_text_end l2c210_inv_range v7_dma_clean_range bcma_host_soc_read32 __netif_receive_skb_core

Re: Optimizing kernel compilation / alignments for network performance

2022-05-06 Thread Rafał Miłecki
On 5.05.2022 18:46, Felix Fietkau wrote: On 05.05.22 18:04, Andrew Lunn wrote: you'll see that most used functions are: v7_dma_inv_range __irqentry_text_end l2c210_inv_range v7_dma_clean_range bcma_host_soc_read32 __netif_receive_skb_core arch_cpu_idle l2c210_clean_range fib_table_lookup

Re: Optimizing kernel compilation / alignments for network performance

2022-05-06 Thread Rafał Miłecki
On 5.05.2022 18:04, Andrew Lunn wrote: you'll see that most used functions are: v7_dma_inv_range __irqentry_text_end l2c210_inv_range v7_dma_clean_range bcma_host_soc_read32 __netif_receive_skb_core arch_cpu_idle l2c210_clean_range fib_table_lookup There is a lot of cache management functions

Re: Optimizing kernel compilation / alignments for network performance

2022-05-05 Thread Felix Fietkau
On 05.05.22 18:04, Andrew Lunn wrote: you'll see that most used functions are: v7_dma_inv_range __irqentry_text_end l2c210_inv_range v7_dma_clean_range bcma_host_soc_read32 __netif_receive_skb_core arch_cpu_idle l2c210_clean_range fib_table_lookup There is a lot of cache management functions

Re: Optimizing kernel compilation / alignments for network performance

2022-05-05 Thread Andrew Lunn
> you'll see that most used functions are: > v7_dma_inv_range > __irqentry_text_end > l2c210_inv_range > v7_dma_clean_range > bcma_host_soc_read32 > __netif_receive_skb_core > arch_cpu_idle > l2c210_clean_range > fib_table_lookup There is a lot of cache management functions here. Might sound odd,

Re: Optimizing kernel compilation / alignments for network performance

2022-05-05 Thread Rafał Miłecki
On 29.04.2022 16:49, Arnd Bergmann wrote: On Wed, Apr 27, 2022 at 7:31 PM Rafał Miłecki wrote: On 27.04.2022 14:56, Alexander Lobakin wrote: Thank you Alexander, this appears to be helpful! I decided to ignore CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B for now and just adjust CFLAGS manually.

Re: Optimizing kernel compilation / alignments for network performance

2022-04-29 Thread Arnd Bergmann
On Wed, Apr 27, 2022 at 7:31 PM Rafał Miłecki wrote: > On 27.04.2022 14:56, Alexander Lobakin wrote: > Thank you Alexander, this appears to be helpful! I decided to ignore > CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B for now and just adjust CFLAGS > manually. > > > 1. Without ce5013ff3bec and with

Re: Optimizing kernel compilation / alignments for network performance

2022-04-29 Thread Rafał Miłecki
On 27.04.2022 19:31, Rafał Miłecki wrote: On 27.04.2022 14:56, Alexander Lobakin wrote: From: Rafał Miłecki Date: Wed, 27 Apr 2022 14:04:54 +0200 I noticed years ago that kernel changes touching code - that I don't use at all - can affect network performance for me. I work with home routers

Re: Optimizing kernel compilation / alignments for network performance

2022-04-27 Thread Rafał Miłecki
On 27.04.2022 14:56, Alexander Lobakin wrote: From: Rafał Miłecki Date: Wed, 27 Apr 2022 14:04:54 +0200 I noticed years ago that kernel changes touching code - that I don't use at all - can affect network performance for me. I work with home routers based on Broadcom Northstar platform.

Re: Optimizing kernel compilation / alignments for network performance

2022-04-27 Thread Alexander Lobakin
From: Rafał Miłecki Date: Wed, 27 Apr 2022 14:04:54 +0200 > Hi, Hej, > > I noticed years ago that kernel changes touching code - that I don't use > at all - can affect network performance for me. > > I work with home routers based on Broadcom Northstar platform. Those > are SoCs with