All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	allan.stephens@windriver.com
Subject: Re: [PATCH net-next 3/5] tipc: Optimizations to bearer enabling logic
Date: Mon, 18 Oct 2010 06:50:17 -0400	[thread overview]
Message-ID: <20101018105017.GA16326@hmsreliant.think-freely.org> (raw)
In-Reply-To: <4CB8C824.7090800@windriver.com>

On Fri, Oct 15, 2010 at 05:31:16PM -0400, Paul Gortmaker wrote:
> On 10-10-15 07:00 AM, Neil Horman wrote:
> 
> [...]
> 
> > This definately looks more concise, but I don't see why its necessecary to drop
> > the tipc_net_lock around the call to enable_bearer.  The only caler of
> > tipc_register_media sets the enable_bearer pointer to the enable_bearer
> > function, and  I' don't see any path through that function which would
> > potentially retake that lock.  In fact it seems dropping it might be dangerous,
> > if other paths (like from cfg_named_msg_event), tried to enable a bearer in
> > parallel with a user space directive from the netlink socket).  With out the
> > protection of tipc_net_lock, you could use the same eth_bearer twice, and
> > corrupt that array.
> 
> I think it would be protected by config_lock. but in the end if it is
> just an academic optimization that really isn't in a hot code path
> anyway, and if it just adds more confusion than real world value, then
> I'm fine with just dropping this on the floor (and deleting the extra
> memset in a cleanup patch) -- it won't be the 1st time doing this with
> these carry forward patches, and I'm sure it won't be the last.
> 

Copy that.


> 

  reply	other threads:[~2010-10-18 10:50 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  0:25 [PATCH net-next 1/5] tipc: Enhance enabling and disabling of Ethernet bearers Paul Gortmaker
2010-10-13  0:25 ` [PATCH net-next 2/5] tipc: Simplify bearer shutdown logic Paul Gortmaker
2010-10-13 14:39   ` Neil Horman
2010-10-14 23:58     ` Paul Gortmaker
2010-10-15 10:48       ` Neil Horman
2010-10-13  0:25 ` [PATCH net-next 3/5] tipc: Optimizations to bearer enabling logic Paul Gortmaker
2010-10-13 14:58   ` Neil Horman
2010-10-15  1:11     ` Paul Gortmaker
2010-10-15 11:00       ` Neil Horman
2010-10-15 21:31         ` Paul Gortmaker
2010-10-18 10:50           ` Neil Horman [this message]
2010-10-18 21:43             ` Paul Gortmaker
2010-10-18 23:59               ` Neil Horman
2010-10-21 11:31               ` David Miller
2010-10-13  0:25 ` [PATCH net-next 4/5] tipc: Rework data structures that track neighboring nodes and links Paul Gortmaker
2010-10-13 16:24   ` Neil Horman
2010-10-13  0:25 ` [PATCH net-next 5/5] tipc: clean out all instances of #if 0'd unused code Paul Gortmaker
2010-10-13 16:26   ` Neil Horman
2010-10-13 17:08     ` Paul Gortmaker
2010-10-13 17:23       ` Neil Horman
2010-10-13 21:28       ` David Miller
2010-10-13 23:20         ` [PATCH net-next] tipc: cleanup function namespace Stephen Hemminger
2010-10-14  0:23           ` Paul Gortmaker
2010-10-14  0:32             ` Stephen Hemminger
2010-10-14  1:29             ` Neil Horman
2010-10-14 17:53               ` Paul Gortmaker
2010-10-14 18:33                 ` Stephen Hemminger
2010-10-14 19:49                   ` Jon Maloy
2010-10-14 21:44                   ` Paul Gortmaker
2010-10-14 22:13                     ` Stephen Hemminger
2010-10-15 11:01                       ` Neil Horman
2010-10-15 16:59                         ` Jon Maloy
2010-10-14 13:31           ` Jon Maloy
2010-10-16 18:56           ` David Miller
2010-10-13 13:42 ` [PATCH net-next 1/5] tipc: Enhance enabling and disabling of Ethernet bearers Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101018105017.GA16326@hmsreliant.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=allan.stephens@windriver.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.