[ovs-dev] [PATCH net-next v2 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-23 Thread Eddy Tao
VarianceAverage UDP_RR 10 %1.51 49097 TCP_RR 10 %5.58 78540 TCP_CRR 10 %0.14 20542 UDP_STREAM 10 %11.17 22532 TCP_STREAM 10 %11.14 28579 Signed-off-by: Eddy Tao --- net/openvswitch/datapath.c | 30

Re: [ovs-dev] [PATCH net-next v2 1/1] net: openvswitch: Use on stack sw_flow_key in ovs_packet_cmd_execute

2023-02-23 Thread Eddy Tao
Sorry, there is a typo in the mail, i will resend shortly, please ignore it for now On 2023/2/23 20:21, Eddy Tao wrote: Use on stack sw_flow_key in ovs_packet_cmd_execute Reason: As key function in slow-path, ovs_packet_cmd_execute and ovs_flow_cmd_new allocate transient memory

[ovs-dev] [PATCH net-next v2 1/1] net: openvswitch: Use on stack sw_flow_key in ovs_packet_cmd_execute

2023-02-23 Thread Eddy Tao
Mode Iterations VarianceAverage UDP_RR 10 %1.51 49097 TCP_RR 10 %5.58 78540 TCP_CRR 10 %0.14 20542 UDP_STREAM 10 %11.17 22532 TCP_STREAM 10 %11.14 28579 Signed-off-by: Eddy Tao --- V1

Re: [ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-19 Thread Eddy Tao
Hi, Simon:     About your concern for the stack size, it leads to more room for improvement. I will file a new version which will have smaller stack occupation and better performance The new revision is invoked by existing examples of using struct in stack, in the same file

Re: [ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-19 Thread Eddy Tao
* 100)/average On 2023/2/20 11:04, Eddy Tao wrote: Hi, Simon:     To have better visibility of the effect of the patch, i did another test below Disabling data-path flow installation to steer traffic to slow path only, thus I can observe the performance on slow path,

Re: [ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-19 Thread Eddy Tao
Hi, Simon:     To have better visibility of the effect of the patch, i did another test below Disabling data-path flow installation to steer traffic to slow path only, thus I can observe the performance on slow path, where ovs_packet_cmd_execute is extensively used Testing topology  

Re: [ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-19 Thread Eddy Tao
Are there other code-paths that would also benefit from this change. The change is focused on packets goes from user-space to data-path, I do not see other code-path that can benefit from this change eddy ___ dev mailing list d...@openvswitch.org

Re: [ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-19 Thread Eddy Tao
Hi, Simon:     Thanks for looking into this. The revisions i proposed are complementary for the same purpose, and also reside in the same code segment. I named them 2 items to clarify the details. Maybe it would be better to name them 2 steps in the same revision to avoid confusion. And

[ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: ovs_packet_cmd_execute put sw_flow mainbody in stack

2023-02-17 Thread Eddy Tao
for sw_flow_stats. Reason: ovs_execute_actions does not touch sw_flow_stats. Benefit: less memzero, say each 'sw_flow_stats *' takes 4/8 bytes, on systems with 20 to 128 logic cpus, this is a good deal. Signed-off-by: Eddy Tao --- net/openvswitch/datapath.c | 22 -- 1 file changed

Re: [ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: remove unnecessary vlan init in key_extract

2023-02-07 Thread Eddy Tao
Hi, Simon:     Thanks for looking into this. by looking into the compiled instructions, i am convinced the patch is logically correct but not help in performance, and it adds complexity, Below function is actually optimized to one movq instruction with no special -O settings on my centos8,

[ovs-dev] [PATCH net-next v1 1/1] net: openvswitch: remove unnecessary vlan init in key_extract

2023-02-06 Thread Eddy Tao
igned-off-by: Eddy Tao --- net/openvswitch/flow.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index e20d1a973417..30a90597cab6 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -480,1

Re: [ovs-dev] [PATCH net-next v8 1/1] net: openvswitch: reduce cpu_used_mask memory

2023-02-06 Thread Eddy Tao
Yes, Eelco, this is the last revision and no further comments for revision came in eddy On 2023/2/6 19:21, Eelco Chaudron wrote: On 5 Feb 2023, at 2:35, Eddy Tao wrote: Use actual CPU number instead of hardcoded value to decide the size of 'cpu_used_mask' in 'struct sw_flow'. Below

[ovs-dev] [PATCH net-next v8 1/1] net: openvswitch: reduce cpu_used_mask memory

2023-02-04 Thread Eddy Tao
of memory is enough. Signed-off-by: Eddy Tao --- V7 -> V8: add blanc space after colon in subject line V6 -> V7: initialize cpu_used_mask after stats_last_writer V5 -> V6: add tab to align the wrapped cpumask_set_cpu call V4 -> V5: fix max-line-length warning V3 -> V4: no change, so

Re: [ovs-dev] [PATCH net-next v7 1/1] net:openvswitch:reduce cpu_used_mask memory

2023-02-04 Thread Eddy Tao
Hi, Simon:     Thank you for the time on the review. and i looked into net folder and get various results 'net:', 'net: gre:', 'net: bridge:', 'net: thunderx', 'net: sock', 'net: genetlink', and there is also examples as you suggested like 'devlink:' similarly, in other folders i see

[ovs-dev] [PATCH net-next v7 1/1] net:openvswitch:reduce cpu_used_mask memory

2023-02-03 Thread Eddy Tao
is enough Signed-off-by: Eddy Tao --- net/openvswitch/flow.c | 9 ++--- net/openvswitch/flow.h | 2 +- net/openvswitch/flow_table.c | 8 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index e20d1a973417

[ovs-dev] [PATCH net-next v6 1/1] net:openvswitch:reduce cpu_used_mask memory

2023-02-03 Thread Eddy Tao
ovs_flow_alloc To address this, redefine cpu_used_mask to pointer append cpumask_size() bytes after 'stat' to hold cpumask cpumask APIs like cpumask_next and cpumask_set_cpu never access bits beyond cpu count, cpumask_size() bytes of memory is enough Signed-off-by: Eddy Tao --- net/openvswitch

[ovs-dev] [PATCH net-next v5 1/1] net:openvswitch:reduce cpu_used_mask memory

2023-02-03 Thread Eddy Tao
ovs_flow_alloc To address this, redefine cpu_used_mask to pointer append cpumask_size() bytes after 'stat' to hold cpumask cpumask APIs like cpumask_next and cpumask_set_cpu never access bits beyond cpu count, cpumask_size() bytes of memory is enough Signed-off-by: Eddy Tao --- net/openvswitch

[ovs-dev] [PATCH net-next v4 1/1] net:openvswitch:reduce cpu_used_mask memory

2023-02-03 Thread Eddy Tao
ovs_flow_alloc To address this, redefine cpu_used_mask to pointer append cpumask_size() bytes after 'stat' to hold cpumask cpumask APIs like cpumask_next and cpumask_set_cpu never access bits beyond cpu count, cpumask_size() bytes of memory is enough Signed-off-by: Eddy Tao --- net/openvswitch

[ovs-dev] [PATCH net-next v3 1/1] net:openvswitch:reduce cpu_used_mask memory

2023-02-02 Thread Eddy Tao
count, cpumask_size() bytes of memory is enough Signed-off-by: Eddy Tao --- net/openvswitch/flow.c | 8 +--- net/openvswitch/flow.h | 2 +- net/openvswitch/flow_table.c | 8 +--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/flow.c b/net