From: Stephen Hemminger <stephen@networkplumber.org>
To: David Miller <davem@davemloft.net>
Cc: dmitry@broadcom.com, netdev@vger.kernel.org, eilong@broadcom.com,
ariele@broadcom.com
Subject: Re: [PATCH net v5 1/5] bnx2x: protect different statistics flows
Date: Tue, 13 Aug 2013 10:57:19 -0700 [thread overview]
Message-ID: <20130813105719.09222122@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20130812.212402.138911128487906526.davem@davemloft.net>
On Mon, 12 Aug 2013 21:24:02 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Mon, 12 Aug 2013 17:12:08 -0700
>
> > On Tue, 13 Aug 2013 02:24:59 +0300
> > "Dmitry Kravkov" <dmitry@broadcom.com> wrote:
> >
> >> + bool stats_started;
> >> + struct semaphore stats_sema;
> >
> > Is there a reason to use a counting semaphore? Do you expect it to
> > be held across user process boundary? or want count > 1?
> >
> > Use of semaphores as a locking primitive is discouraged,
> > instead us a mutex.
>
> Would you please look at the feedback I gave these guys to the
> previous iteration of these changes?
>
> They were using custom locking primitives and semaphores gave
> the best approximation to the semantics they were looking for.
Your right in this case sempahore makes sense because it is
used to hold off process while hardware responds.
next prev parent reply other threads:[~2013-08-13 17:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 23:24 [PATCH net v5 0/5] bnx2x: fixes Dmitry Kravkov
2013-08-12 23:24 ` [PATCH net v5 1/5] bnx2x: protect different statistics flows Dmitry Kravkov
2013-08-13 0:12 ` Stephen Hemminger
2013-08-13 4:24 ` David Miller
2013-08-13 17:57 ` Stephen Hemminger [this message]
2013-08-13 17:54 ` Neal Cardwell
2013-08-12 23:25 ` [PATCH net v5 2/5] bnx2x: update fairness parameters following DCB negotiation Dmitry Kravkov
2013-08-12 23:25 ` [PATCH net v5 3/5] bnx2x: fix memory leak in VF Dmitry Kravkov
2013-08-12 23:25 ` [PATCH net v5 4/5] bnx2x: fix PTE write access error Dmitry Kravkov
2013-08-12 23:25 ` [PATCH net v5 5/5] bnx2x: prevent crash in shutdown flow with CNIC Dmitry Kravkov
2013-08-13 12:30 ` [PATCH net v5 0/5] bnx2x: fixes Benjamin Poirier
2013-08-13 12:38 ` Ariel Elior
2013-08-13 14:07 ` Benjamin Poirier
2013-08-13 14:16 ` Dmitry Kravkov
2013-08-13 17:44 ` Benjamin Poirier
2013-08-13 23:04 ` David Miller
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=20130813105719.09222122@nehalam.linuxnetplumber.net \
--to=stephen@networkplumber.org \
--cc=ariele@broadcom.com \
--cc=davem@davemloft.net \
--cc=dmitry@broadcom.com \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
/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.