All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments
@ 2017-11-07 13:50 Manish Kurup
  2017-11-10  5:53 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Manish Kurup @ 2017-11-07 13:50 UTC (permalink / raw)
  To: jhs, xiyou.wangcong, jiri, davem, jakub.kicinski,
	pieter.jansenvanvuuren, simon.horman, john.hurley, oss-drivers,
	netdev
  Cc: aring, mrv, kurup.manish, Manish Kurup

This commit consists of 3 patches:

patch1 (1/3):
The VLAN action maintains one set of stats across all cores, and uses a
spinlock to synchronize updates to it from the same. Changed this to use a
per-CPU stats context instead.
This change will result in better performance.

patch2 (2/3):
Modified netronome nfp flower action to use VLAN helper functions instead
of accessing/referencing TC act_vlan private structures directly. 

patch3 (3/3):
Using a spinlock in the VLAN action causes performance issues when the VLAN
action is used on multiple cores. Rewrote the VLAN action to use RCU read
locking for reads and updates instead.
All functions now use an RCU dereferenced pointer to access the VLAN action
context. Modified helper functions used by other modules, to use the RCU as
opposed to directly accessing the structure.

As part of this review, there were some changes suggested by reviewers.
I have incorporated all the changes that were requested.

Here're the changes:
v2: Fixed all helper functions to use RCU (rtnl_dereference) - Eric, Jamal
v2: Fixed indentation, extra line nits - Jamal, Jiri
v2: Moved rcu_head to the end of the struct - Jiri
v2: Re-formatted locals to reverse-christmas-tree - Jiri
v2: Removed mismatched spin_lock() - Cong
v2: Removed spin_lock_bh() in tcf_vlan_init, rtnl_dereference() should
    suffice - Cong, Jiri
v4: Modified the nfp flower action code to use the VLAN helper functions
    instead of referencing the structure directly. Isolated this into a
    separate patch - Pieter Jansen
v5: Got rid of the unlikely() for the allocation case - Simon Horman
v6: Had forgotten cleanup functions for RCU alloc, added them - Dave Miller
v7: Re-formatted more locals to reverse-christmas-tree - Pieter V

Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Manish Kurup <manish.kurup@verizon.com>


Manish Kurup (3):
  act_vlan: Change stats update to use per-core stats
  nfp flower action: Modified to use VLAN helper functions
  act_vlan: VLAN action rewrite to use RCU lock/unlock and update

 drivers/net/ethernet/netronome/nfp/flower/action.c |  5 +-
 include/net/tc_act/tc_vlan.h                       | 46 +++++++++---
 net/sched/act_vlan.c                               | 81 +++++++++++++++-------
 3 files changed, 94 insertions(+), 38 deletions(-)

-- 
2.7.4

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

* Re: [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments
  2017-11-07 13:50 [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments Manish Kurup
@ 2017-11-10  5:53 ` David Miller
  2017-11-10 12:30   ` Manish Kurup
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2017-11-10  5:53 UTC (permalink / raw)
  To: kurup.manish
  Cc: jhs, xiyou.wangcong, jiri, jakub.kicinski,
	pieter.jansenvanvuuren, simon.horman, john.hurley, oss-drivers,
	netdev, aring, mrv, manish.kurup

From: Manish Kurup <kurup.manish@gmail.com>
Date: Tue,  7 Nov 2017 08:50:00 -0500

> This commit consists of 3 patches:
> 
> patch1 (1/3):
> The VLAN action maintains one set of stats across all cores, and uses a
> spinlock to synchronize updates to it from the same. Changed this to use a
> per-CPU stats context instead.
> This change will result in better performance.
> 
> patch2 (2/3):
> Modified netronome nfp flower action to use VLAN helper functions instead
> of accessing/referencing TC act_vlan private structures directly. 
> 
> patch3 (3/3):
> Using a spinlock in the VLAN action causes performance issues when the VLAN
> action is used on multiple cores. Rewrote the VLAN action to use RCU read
> locking for reads and updates instead.
> All functions now use an RCU dereferenced pointer to access the VLAN action
> context. Modified helper functions used by other modules, to use the RCU as
> opposed to directly accessing the structure.
> 
> As part of this review, there were some changes suggested by reviewers.
> I have incorporated all the changes that were requested.
 ...

Series applied, thank you.

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

* Re: [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments
  2017-11-10  5:53 ` David Miller
@ 2017-11-10 12:30   ` Manish Kurup
  2017-11-10 13:39     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Manish Kurup @ 2017-11-10 12:30 UTC (permalink / raw)
  To: David Miller
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, Jakub Kicinski,
	Pieter Jansen van Vuuren, Simon Horman, John Hurley, oss-drivers,
	Netdev, Alexander Aring, Roman Mashak, Manish Kurup

Hi Dave,

On Fri, Nov 10, 2017 at 12:53 AM, David Miller <davem@davemloft.net> wrote:
> From: Manish Kurup <kurup.manish@gmail.com>
> Date: Tue,  7 Nov 2017 08:50:00 -0500
>
>> This commit consists of 3 patches:
>>
>> patch1 (1/3):
>> The VLAN action maintains one set of stats across all cores, and uses a
>> spinlock to synchronize updates to it from the same. Changed this to use a
>> per-CPU stats context instead.
>> This change will result in better performance.
>>
>> patch2 (2/3):
>> Modified netronome nfp flower action to use VLAN helper functions instead
>> of accessing/referencing TC act_vlan private structures directly.
>>
>> patch3 (3/3):
>> Using a spinlock in the VLAN action causes performance issues when the VLAN
>> action is used on multiple cores. Rewrote the VLAN action to use RCU read
>> locking for reads and updates instead.
>> All functions now use an RCU dereferenced pointer to access the VLAN action
>> context. Modified helper functions used by other modules, to use the RCU as
>> opposed to directly accessing the structure.
>>
>> As part of this review, there were some changes suggested by reviewers.
>> I have incorporated all the changes that were requested.
>  ...
>
> Series applied, thank you.

Thanks for applying the patch, however -

The last version I sent out (with changes for comments), was v10, But
I noticed that you applied v7 (without the reverse xmas tree patch on
patch #3).

Was there something wrong with that patch? Pleas let me know.

Thanks.

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

* Re: [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments
  2017-11-10 12:30   ` Manish Kurup
@ 2017-11-10 13:39     ` David Miller
  2017-11-10 13:54       ` Manish Kurup
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2017-11-10 13:39 UTC (permalink / raw)
  To: kurup.manish
  Cc: jhs, xiyou.wangcong, jiri, jakub.kicinski,
	pieter.jansenvanvuuren, simon.horman, john.hurley, oss-drivers,
	netdev, aring, mrv, manish.kurup

From: Manish Kurup <kurup.manish@gmail.com>
Date: Fri, 10 Nov 2017 07:30:09 -0500

> The last version I sent out (with changes for comments), was v10, But
> I noticed that you applied v7 (without the reverse xmas tree patch on
> patch #3).

Check my tree, I actually applied a later version than v7.

Sorry for the confusion.

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

* Re: [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments
  2017-11-10 13:39     ` David Miller
@ 2017-11-10 13:54       ` Manish Kurup
  0 siblings, 0 replies; 5+ messages in thread
From: Manish Kurup @ 2017-11-10 13:54 UTC (permalink / raw)
  To: David Miller
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, Jakub Kicinski,
	Pieter Jansen van Vuuren, Simon Horman, John Hurley, oss-drivers,
	Netdev, Alexander Aring, Roman Mashak, Manish Kurup

Hi Dave,

On Fri, Nov 10, 2017 at 8:39 AM, David Miller <davem@davemloft.net> wrote:
> From: Manish Kurup <kurup.manish@gmail.com>
> Date: Fri, 10 Nov 2017 07:30:09 -0500
>
>> The last version I sent out (with changes for comments), was v10, But
>> I noticed that you applied v7 (without the reverse xmas tree patch on
>> patch #3).
>
> Check my tree, I actually applied a later version than v7.
>
> Sorry for the confusion.
Yes, you're right. I did a 'git pull' this morning, and saw the log
with my patches in there, but the changes didnt include the reverse
xmas tree patches that I'd made after comments by Pieter, Alexander,
Jamal and you,my latest review version mail - v10. What I see after
the git pull, in the repo (net-next): v9.

I guess you dropped my reverse xmas tree changes (v10). Sorry for the confusion.

Thanks,

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

end of thread, other threads:[~2017-11-10 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 13:50 [PATCH net-next v7 0/3] nfp act_vlan: Rewrite of the TC vlan action to use the RCU, and incorporated review comments Manish Kurup
2017-11-10  5:53 ` David Miller
2017-11-10 12:30   ` Manish Kurup
2017-11-10 13:39     ` David Miller
2017-11-10 13:54       ` Manish Kurup

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.