Re: [PATCH net-next v9 2/4] ethtool: provide customized dim profile management

2024-04-24 Thread Jakub Kicinski
On Thu, 25 Apr 2024 00:49:26 +0800 Heng Qi wrote: > If I'm not wrong, you don't want an interface > like .ndo_init_irq_moder, but instead provide a generic interface in > dim.c (e.g. net_dim_init_irq_moder() with parameters dev and struct > dim_irq_moder or separate flags,mode,work). Then this func

Re: [PATCH net-next v9 2/4] ethtool: provide customized dim profile management

2024-04-24 Thread Heng Qi
在 2024/4/25 上午12:18, Jakub Kicinski 写道: On Wed, 24 Apr 2024 21:41:55 +0800 Heng Qi wrote: +struct dim_irq_moder { +   /* See DIM_PROFILE_* */ +   u8 profile_flags; + +   /* See DIM_COALESCE_* for Rx and Tx */ +   u8 coal_flags; + +   /* Rx DIM period count mode: CQE or EQE

Re: [PATCH net-next v9 2/4] ethtool: provide customized dim profile management

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 21:41:55 +0800 Heng Qi wrote: > +struct dim_irq_moder { > +   /* See DIM_PROFILE_* */ > +   u8 profile_flags; > + > +   /* See DIM_COALESCE_* for Rx and Tx */ > +   u8 coal_flags; > + > +   /* Rx DIM period count mode: CQE or EQE */ > +   u8 dim_rx_mode;

Re: [PATCH net-next v9 2/4] ethtool: provide customized dim profile management

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 21:10:55 +0800 Heng Qi wrote: > >> This doesn't work because the first level of sub-nesting of > >> ETHTOOL_A_COALESCE_RX_CQE_PROFILE is ETHTOOL_A_PROFILE_IRQ_MODERATION. > > So declare a policy for IRQ_MODERATION which has one entry -> nested > > profile policy? > > Still

Re: [PATCH v1 0/2] Documentation: process: Clarify use of Cc:

2024-04-24 Thread Andy Shevchenko
+Cc: Dmitry (have been told by colleague of mine that you also has an opinion on this topic, sorry if I added you by a mistake). On Tue, Apr 23, 2024 at 04:19:36PM +0300, Andy Shevchenko wrote: > Add a couple of recommendations on how to utilise Cc header in > environment friendly way. > > Andy

[PATCH 8/8] rtla: Add --trace-buffer-size option

2024-04-24 Thread Daniel Bristot de Oliveira
Add the option allow the users to set a different buffer size for the trace. For example, in large systems, the user might be interested on reducing the trace buffer to avoid large tracing files. The buffer size is specified in kB, and it is only affecting the tracing instance. Signed-off-by: Dan

[PATCH 7/8] rtla/timerlat: Make user-space threads the default

2024-04-24 Thread Daniel Bristot de Oliveira
After ther -u addition, most of the known users are setting it. And it makes sense, as it adds more information, and inherits the default setup for the threads - e.g., cgroups configs. Thus, if the user-space interface is available, enable -u. Otherwise, use the in-kernel thread. Add the -k optio

[PATCH 6/8] rtla: Add the --warm-up option

2024-04-24 Thread Daniel Bristot de Oliveira
On many cases, the results right after the startup are different from the rest of the execution, biasing the results. For example, on osnoise, the scheduler might take some time to adapt to the new busy-loop workload. Add the --warm-up option, adding a warm-up phase (in seconds) where the workloa

[PATCH 5/8] rtla/timerlat: Add a summary for hist mode

2024-04-24 Thread Daniel Bristot de Oliveira
Like on rtla timerlat top, add an overall summary at the bottom of timerlat hist. For instance: # timerlat hist -c 0-1 -d 10s -E 20 # RTLA timerlat histogram # Time unit is microseconds (us) # Duration: 0 00:00:10 Index IRQ-000 Thr-000 IRQ-001 Thr-001 6 1

[PATCH 4/8] rtla/timerlat: Add a summary for top mode

2024-04-24 Thread Daniel Bristot de Oliveira
While the per-cpu values are the results to take into consideration, the overall system values are also useful. Add a summary at the bottom of rtla timerlat top showing the overall results. For instance: Timer Latency 0 00:00:10 | IRQ Timer La

[PATCH 3/8] rtla/timerlat: Use pretty formatting only on interactive tty

2024-04-24 Thread Daniel Bristot de Oliveira
timerlat top does some background/font color formatting. While useful on terminal, it breaks the output on other formats. For example, when piping the output for pastebin tools, the format strings are printed as characters. For instance: [2;37;40m Timer Latenc

[PATCH 2/8] rtla/auto-analysis: Replace \t with spaces

2024-04-24 Thread Daniel Bristot de Oliveira
When copying timerlat auto-analysis from a terminal to some web pages or chats, the \t are being replaced with a single ' ' or '', breaking the output. For example: ## CPU 3 hit stop tracing, analyzing it ## IRQ handler delay:1.30 us (0.11 %) IRQ latency:

[PATCH 1/8] rtla/timerlat: Simplify "no value" printing on top

2024-04-24 Thread Daniel Bristot de Oliveira
Instead of printing three times the same output, print it only once, reducing lines and being sure that all no values have the same length. It also fixes an extra '\n' when running the with kernel threads, like here: === %< == Tim

[PATCH 0/8] rtla usage improvements

2024-04-24 Thread Daniel Bristot de Oliveira
Hi These are some changes I have accumulated in the last weeks. Mostly improving the tool's user experience. - On timerlat top, remove an extra \n that was breaking the output. - Replace \t with ' ' on the auto analysis, fixing some copy & paste. - On timerlat top, do not print T

Re: [PATCH net-next v9 2/4] ethtool: provide customized dim profile management

2024-04-24 Thread Heng Qi
+++ b/include/linux/ethtool.h @@ -284,7 +284,11 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,   #define ETHTOOL_COALESCE_TX_AGGR_MAX_BYTES    BIT(24)   #define ETHTOOL_COALESCE_TX_AGGR_MAX_FRAMES    BIT(25)   #define ETHTOOL_COALESCE_TX_AGGR_TIME_USECS    BIT(26) -#define E

Re: [PATCH net-next v9 2/4] ethtool: provide customized dim profile management

2024-04-24 Thread Heng Qi
@@ -227,7 +315,19 @@ const struct nla_policy ethnl_coalesce_set_policy[] = { [ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES] = { .type = NLA_U32 }, [ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES] = { .type = NLA_U32 }, [ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS] = { .type = NLA_U32 }, +

Re: [PATCH v1 06/18] mm: make folio_mapcount() return 0 for small typed folios

2024-04-24 Thread David Hildenbrand
On 09.04.24 21:22, David Hildenbrand wrote: We already handle it properly for large folios. Let's also return "0" for small typed folios, like page_mapcount() currently would. Consequently, folio_mapcount() will never return negative values for typed folios, but may return negative values for un

Re: [PATCH v1 01/18] mm: allow for detecting underflows with page_mapcount() again

2024-04-24 Thread David Hildenbrand
On 09.04.24 21:22, David Hildenbrand wrote: Commit 53277bcf126d ("mm: support page_mapcount() on page_has_type() pages") made it impossible to detect mapcount underflows by treating any negative raw mapcount value as a mapcount of 0. We perform such underflow checks in zap_present_folio_ptes() a