public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: 'Christoph Hellwig' <hch@infradead.org>
To: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [ANNOUNCE] Emulex lpfcdriver v8.0.7 available
Date: Tue, 27 Jul 2004 13:09:24 +0100	[thread overview]
Message-ID: <20040727130924.A19273@infradead.org> (raw)
In-Reply-To: <20040723211529.GQ20738@ma.emulex.com>; from Jamie.Wellnitz@emulex.com on Fri, Jul 23, 2004 at 05:15:29PM -0400

There's some more issues with timer useag in the driver:

 - never to timer->expires = 0, the proper way to stop a timer
   is del_timer, or del_timer_sync if you need to ensure the handler
   isn't running anymore when your finished (typically only needed
   when you free the containing object afterwards)
 - if you just want to modify the timeout use mod_timer, due to using
   del_timer_sync instead of del_timer your delete/change/add cycles
   actually are safe but not otimal, del_timer_sync is very bad on
   large systems. 
 - you can call del_timer/del_timer_sync/mod_timer on any timer object
   init_timer has been called on, no need to check whether it's actually
   running before
 - for the remaining few cases where you need to check that use timer_pending

As a tule of thumb of the above: never poke into timer->expires for a running
timer.

Also the timer data should usually set just after calling timer_init unless
it may change over the lifetime of the timer object which isn't trivial to
get right.

      parent reply	other threads:[~2004-07-27 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23 21:15 [ANNOUNCE] Emulex lpfcdriver v8.0.7 available Jamie Wellnitz
2004-07-26 13:44 ` 'Christoph Hellwig'
2004-07-27 12:09 ` 'Christoph Hellwig' [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=20040727130924.A19273@infradead.org \
    --to=hch@infradead.org \
    --cc=Jamie.Wellnitz@emulex.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