public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom•com>
To: "Matthew Carlson" <mcarlson@broadcom•com>
Cc: netdev <netdev@vger•kernel.org>, Nathan Lynch <ntl@pobox•com>,
	linuxppc-dev list <linuxppc-dev@ozlabs•org>
Subject: Re: Strange tg3 regression with UMP fw. link reporting
Date: Fri, 08 Aug 2008 08:20:04 -0700	[thread overview]
Message-ID: <1218208804.12081.14.camel@HP1> (raw)
In-Reply-To: <20080808184359.GB23249@HP-xw6200.broadcom.net>


On Fri, 2008-08-08 at 11:43 -0700, Matthew Carlson wrote:
> Segher is right.  The code should be 2.5 milliseconds but is actually
> much longer.  This fix is actually already in my patch queue and needs
> to be sent upstream.
> 

Matt, I think we can optimize this a little more.  The heart beat event
is sent every second and the link event is sent whenever the link
changes.  the spin wait is only needed in rare cases when the link event
is closer than 2.5 msec from the heart beat event.

We can save the jiffies time stamp right after sending each event.  Next
time we need to send a heart beat or a link event, we check the jiffies
with the stored time stamp.  If they are less than 2.5 msec apart and we
haven't received the ACK from the previous event yet, we just wait up to
the remainder.  It should be very rare that we have to wait.

  reply	other threads:[~2008-08-08 19:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  7:35 Strange tg3 regression with UMP fw. link reporting Benjamin Herrenschmidt
2008-08-08  8:58 ` Segher Boessenkool
2008-08-08  9:18   ` Benjamin Herrenschmidt
2008-08-08 18:43     ` Matt Carlson
2008-08-08 15:20       ` Michael Chan [this message]
2008-08-08 22:05       ` Benjamin Herrenschmidt
2008-08-08 20:20         ` Michael Chan
2008-08-08 21:25     ` Nathan Lynch
2008-08-08  9:21   ` Arnd Bergmann

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=1218208804.12081.14.camel@HP1 \
    --to=mchan@broadcom$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=mcarlson@broadcom$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=ntl@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox