netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 2/2] openvswitch: Use lockless genl.
@ 2013-04-18 21:16 Pravin B Shelar
  2013-04-18 21:18 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Pravin B Shelar @ 2013-04-18 21:16 UTC (permalink / raw)
  To: netdev; +Cc: dev, jesse, Pravin B Shelar

OVS locking was recently changed to have private OVS lock which
simplified overall locking.  Therefore there is no need to have
another global genl lock to protect OVS data structures.  Following
patch uses of lockless genl family for OVS.  This also allows
more granual OVS locking using ovs_mutex for protecting OVS data
structures, which gives more consurrencey.  E.g multiple genl
operations OVS_PACKET_CMD_EXECUTE can run in parallel, etc.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 net/openvswitch/datapath.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index b7d0b7c..b2c966e 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -270,7 +270,8 @@ static struct genl_family dp_packet_genl_family = {
 	.name = OVS_PACKET_FAMILY,
 	.version = OVS_PACKET_VERSION,
 	.maxattr = OVS_PACKET_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
@@ -836,7 +837,8 @@ static struct genl_family dp_flow_genl_family = {
 	.name = OVS_FLOW_FAMILY,
 	.version = OVS_FLOW_VERSION,
 	.maxattr = OVS_FLOW_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 static struct genl_multicast_group ovs_dp_flow_multicast_group = {
@@ -1269,7 +1271,8 @@ static struct genl_family dp_datapath_genl_family = {
 	.name = OVS_DATAPATH_FAMILY,
 	.version = OVS_DATAPATH_VERSION,
 	.maxattr = OVS_DP_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 static struct genl_multicast_group ovs_dp_datapath_multicast_group = {
@@ -1623,7 +1626,8 @@ static struct genl_family dp_vport_genl_family = {
 	.name = OVS_VPORT_FAMILY,
 	.version = OVS_VPORT_VERSION,
 	.maxattr = OVS_VPORT_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 struct genl_multicast_group ovs_dp_vport_multicast_group = {
-- 
1.7.1

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

* Re: [PATCH net-next 2/2] openvswitch: Use lockless genl.
  2013-04-18 21:16 [PATCH net-next 2/2] openvswitch: Use lockless genl Pravin B Shelar
@ 2013-04-18 21:18 ` David Miller
       [not found]   ` <20130418.171846.2215092862903415243.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2013-04-18 21:18 UTC (permalink / raw)
  To: pshelar; +Cc: netdev, dev, jesse

From: Pravin B Shelar <pshelar@nicira.com>
Date: Thu, 18 Apr 2013 14:16:52 -0700

> OVS locking was recently changed to have private OVS lock which
> simplified overall locking.  Therefore there is no need to have
> another global genl lock to protect OVS data structures.  Following
> patch uses of lockless genl family for OVS.  This also allows
> more granual OVS locking using ovs_mutex for protecting OVS data
> structures, which gives more consurrencey.  E.g multiple genl
> operations OVS_PACKET_CMD_EXECUTE can run in parallel, etc.
> 
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Three problems with this submission:

1) When you resubmit a patch that's part of a series, you must repost
   the entire series.

2) When you post a new version of a patch, you must list (after the
   "---" delimiter) what has changed in this version.

3) When you post a new version of a patch, you must indicate this by
   putting "[PATCH v2 ...] ...", for example, in the Subject line.

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

* Re: [PATCH net-next 2/2] openvswitch: Use lockless genl.
       [not found]   ` <20130418.171846.2215092862903415243.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
@ 2013-04-18 21:24     ` Pravin Shelar
  0 siblings, 0 replies; 6+ messages in thread
From: Pravin Shelar @ 2013-04-18 21:24 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA

On Thu, Apr 18, 2013 at 2:18 PM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
> From: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
> Date: Thu, 18 Apr 2013 14:16:52 -0700
>
>> OVS locking was recently changed to have private OVS lock which
>> simplified overall locking.  Therefore there is no need to have
>> another global genl lock to protect OVS data structures.  Following
>> patch uses of lockless genl family for OVS.  This also allows
>> more granual OVS locking using ovs_mutex for protecting OVS data
>> structures, which gives more consurrencey.  E.g multiple genl
>> operations OVS_PACKET_CMD_EXECUTE can run in parallel, etc.
>>
>> Signed-off-by: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
>
> Three problems with this submission:
>
> 1) When you resubmit a patch that's part of a series, you must repost
>    the entire series.
>
> 2) When you post a new version of a patch, you must list (after the
>    "---" delimiter) what has changed in this version.
>
> 3) When you post a new version of a patch, you must indicate this by
>    putting "[PATCH v2 ...] ...", for example, in the Subject line.

I thought I just need to post patch that was changed. Let me send
updated series again.

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

* Re: [PATCH net-next 2/2] openvswitch: Use lockless genl.
  2013-04-18 18:31 ` Jesse Gross
@ 2013-04-18 21:07   ` Pravin Shelar
  0 siblings, 0 replies; 6+ messages in thread
From: Pravin Shelar @ 2013-04-18 21:07 UTC (permalink / raw)
  To: Jesse Gross; +Cc: netdev, dev

On Thu, Apr 18, 2013 at 11:31 AM, Jesse Gross <jesse@nicira.com> wrote:
> On Thu, Apr 18, 2013 at 9:52 AM, Pravin B Shelar <pshelar@nicira.com> wrote:
>> Following patch uses of lockless genl callbacks for ovs.
>>
>> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
>
> I think this is clearly the right thing to do (assuming that the genl
> part passes review from other people). However, can you expand the
> commit message for this patch a little bit to describe why it is safe
> and some of the benefits?
ok, I will send updated patch.

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

* Re: [PATCH net-next 2/2] openvswitch: Use lockless genl.
  2013-04-18 16:52 Pravin B Shelar
@ 2013-04-18 18:31 ` Jesse Gross
  2013-04-18 21:07   ` Pravin Shelar
  0 siblings, 1 reply; 6+ messages in thread
From: Jesse Gross @ 2013-04-18 18:31 UTC (permalink / raw)
  To: Pravin B Shelar; +Cc: netdev, dev

On Thu, Apr 18, 2013 at 9:52 AM, Pravin B Shelar <pshelar@nicira.com> wrote:
> Following patch uses of lockless genl callbacks for ovs.
>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

I think this is clearly the right thing to do (assuming that the genl
part passes review from other people). However, can you expand the
commit message for this patch a little bit to describe why it is safe
and some of the benefits?

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

* [PATCH net-next 2/2] openvswitch: Use lockless genl.
@ 2013-04-18 16:52 Pravin B Shelar
  2013-04-18 18:31 ` Jesse Gross
  0 siblings, 1 reply; 6+ messages in thread
From: Pravin B Shelar @ 2013-04-18 16:52 UTC (permalink / raw)
  To: netdev; +Cc: dev, jesse, Pravin B Shelar

Following patch uses of lockless genl callbacks for ovs.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 net/openvswitch/datapath.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index b7d0b7c..b2c966e 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -270,7 +270,8 @@ static struct genl_family dp_packet_genl_family = {
 	.name = OVS_PACKET_FAMILY,
 	.version = OVS_PACKET_VERSION,
 	.maxattr = OVS_PACKET_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
@@ -836,7 +837,8 @@ static struct genl_family dp_flow_genl_family = {
 	.name = OVS_FLOW_FAMILY,
 	.version = OVS_FLOW_VERSION,
 	.maxattr = OVS_FLOW_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 static struct genl_multicast_group ovs_dp_flow_multicast_group = {
@@ -1269,7 +1271,8 @@ static struct genl_family dp_datapath_genl_family = {
 	.name = OVS_DATAPATH_FAMILY,
 	.version = OVS_DATAPATH_VERSION,
 	.maxattr = OVS_DP_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 static struct genl_multicast_group ovs_dp_datapath_multicast_group = {
@@ -1623,7 +1626,8 @@ static struct genl_family dp_vport_genl_family = {
 	.name = OVS_VPORT_FAMILY,
 	.version = OVS_VPORT_VERSION,
 	.maxattr = OVS_VPORT_ATTR_MAX,
-	.netnsok = true
+	.netnsok = true,
+	.lockless = true,
 };
 
 struct genl_multicast_group ovs_dp_vport_multicast_group = {
-- 
1.7.1

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

end of thread, other threads:[~2013-04-18 21:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18 21:16 [PATCH net-next 2/2] openvswitch: Use lockless genl Pravin B Shelar
2013-04-18 21:18 ` David Miller
     [not found]   ` <20130418.171846.2215092862903415243.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-04-18 21:24     ` Pravin Shelar
  -- strict thread matches above, loose matches on Subject: below --
2013-04-18 16:52 Pravin B Shelar
2013-04-18 18:31 ` Jesse Gross
2013-04-18 21:07   ` Pravin Shelar

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).