public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: Andreas Herrmann <AHERRMAN@de.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [REPOST #3][PATCH 1/6] lpfc 8.1.7 : Adding statistics reset	callback for FC transport
Date: Thu, 03 Aug 2006 09:56:02 -0400	[thread overview]
Message-ID: <44D20072.8030105@emulex.com> (raw)
In-Reply-To: <OF72A08B9B.60EB1A87-ON422571BF.002BABC0-422571BF.002BE417@de.ibm.com>


Andreas Herrmann wrote:
>> Adding statistics reset callback for FC transport
> 
> Now lpfc is the second FC driver that stores old stats data in
> order to reset FC host stats. (zfcp is the other one.)
> 
> Shouldn't this stuff be moved into scsi_transport_fc?
> So the default for scsi_transport_fc would be to store
> a stats-offset (as you call it) together with seconds since
> last reset. So every FC lldd gets the reset-stats functionality
> for free.
> Of course an lldd is able to register its own reset-callback
> (maybe because the reset is implemented in hardware)
> to replace the default handler.
> 
> This just came into my mind when reviewing your patch.

In looking at what could be different:

- the handling of the "seconds from last reset" is common and could/should
   go into the transport.

- I don't know that i'd change the stats data though...
   I assume you are wanting to move the stats data from a LLD struct to a
   transport struct: I shied away from this initially, as I allowed for
   the data structure to be "hot" - e.g. the LLD is updating values in the
   fast path. There are better cacheline attributes if you let the driver
   manage it's own structure. Thus the call from the transport to fill in
   a reported structure. Granted, for lpfc (at least) much of the LLD
   data is passive as the hardware does the "hot" work.

   Another reason - I shy away from the driver reaching directly into
   transport structures to change values, in order to avoid race conditions.
   I've tried to only do this on static data, so the access is only at
   creation.

I'll look into posting a patch for the "seconds from last reset".
However, I would approach it that for now, the lpfc patches go in as is.
Then, the patch would add the transport support and update the drivers
accordingly (lpfc & zfcp included).

-- james s



      reply	other threads:[~2006-08-03 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 19:24 [REPOST #3][PATCH 1/6] lpfc 8.1.7 : Adding statistics reset callback for FC transport James Smart
2006-08-03  8:06 ` Andreas Herrmann
2006-08-03 13:56   ` James Smart [this message]

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=44D20072.8030105@emulex.com \
    --to=james.smart@emulex.com \
    --cc=AHERRMAN@de.ibm.com \
    --cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox