public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Adam Radford <aradford@amcc.com>
Cc: akpm@osdl.org, james.bottomley@steeleye.com, hch@lst.de,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH/RFC 1/2] 3ware 9000 SATA-RAID driver v2.26.00.009
Date: Thu, 27 May 2004 13:20:27 -0400	[thread overview]
Message-ID: <40B6235B.1080507@pobox.com> (raw)
In-Reply-To: <HYCD4000.31K@hadar.amcc.com>

Adam Radford wrote:
> Jeff,
> 
> Thanks for the useful feedback.
> 
> - The card can take up to 256 io's at a time, but 2 are marked off
>   for internal use.  There are no 'per device' limits.  The firmware queue
>   depth is 256 total for all devices.

Ok.

I would therefore recommend not setting device queue depth in 
->slave_configure(), but rather setting the Scsi_Host_Template's 
->can_queue to 256.

This more accurately reflects the hardware.


> - We are not calling do_gettimeofday() on every command sent to hardware.  It is
>   only sent when firmware requests an AEN_SYNC_TIME, which happens at startup, and
>   probably once a day thereafter.  This is so we can have scheduled events in the
>   firmware, such as rebuild events, scrub events, etc, _without_ an annoying daemon
>   running.  There is clock drift so we periodically sync the time.

I see the AEN_SYNC_TIME usage of do_gettimeofday(), but there are other 
uses of this function as well.


> - The ioctl routine _does_ copy down data buffers.  This isn't in the main IO path.

Still, you shouldn't need to copy all those buffers, just make sure they 
are present and mapped, then pass them to hardware.


> - twa_poll_status_gone() is called to prevent return from a function until the
>   hardware is ready.  How else do you propose delaying when the scsi midlayer called
>   your entrypoint with spin_lock_irqsave(host->host_lock, flags) ?

It's a problem with your model.  The ->queuecommand should 
asynchronously submit commands to hardware, up to the hardware limit.

twa_poll_status_done() AFAICS is being used during initialization and 
such, where ideally you should have code that issues a SCSI command, 
then calls scsi_wait_req or similar to wait for the command's completion.


> I will fix some of the issues you mention and re-send.  Thanks!

Thanks!

	Jeff




  reply	other threads:[~2004-05-27 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-26 21:59 [PATCH/RFC 1/2] 3ware 9000 SATA-RAID driver v2.26.00.009 Adam Radford
2004-05-27 17:20 ` Jeff Garzik [this message]
2004-05-28  4:32   ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2004-05-26 20:46 Adam Radford
2004-05-26 21:42 ` Jeff Garzik

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=40B6235B.1080507@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=aradford@amcc.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@steeleye.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