All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: "Miller, Mike (OS Dev)" <mike.miller@hp.com>
Cc: axboe@suse.de, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: per device queues for cciss 2.6.0
Date: Wed, 10 Mar 2004 13:22:19 -0500	[thread overview]
Message-ID: <404F5CDB.50900@pobox.com> (raw)
In-Reply-To: <D4CFB69C345C394284E4B78B876C1CF105BC1EBB@cceexc23.americas.cpqcorp.net>

Miller, Mike (OS Dev) wrote:
> Yes, the controller has a single command buffer. It can hold 1024 outstanding commands.

Ok, great.  Well then the carmel.c I sent you should be a good model -- 
carmel.c has per-device queues, and there are no starvation issues.  The 
code is contained within only a few LOC, in carm_push_q(), carm_pop_q(), 
and carm_round_robin().

As an aside, you should probably make the call to cciss_round_robin() 
conditional on the hardware's command buffer being at least 1/2 empty. 
(or pick whatever low water mark you like)

The command buffer size, 1024, is quite nice.  Given the same model as 
carmel.c, I predict that blk_{start,stop}_queue will be called quite 
infrequently -- that translates to _high_ performance on the cciss hardware.

Note the blk_{start,stop}_queue() were only recently fixed (grab latest 
2.6.4-rc), so that may have introduced noise into whatever testing and 
design you've done.

Now, per-queue locking, rather than per-HBA locking, definitely 
introduces some additional complexity.  I've got a good idea how to do 
that, which involves the each queue's request function kicking a common 
tasklet that queues commands to hardware.  But there's a lot of deadlock 
potentional if it's not done right, since you still need a common lock 
for the HBA when submitting and completing hardware commands.  So I 
would be interested to see some evidence of actual SMP contention on the 
per-HBA lock...

Regards,

	Jeff




  reply	other threads:[~2004-03-10 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 13:30 per device queues for cciss 2.6.0 Miller, Mike (OS Dev)
2004-03-10 18:22 ` Jeff Garzik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-03-09 23:35 Miller, Mike (OS Dev)
2004-03-09 23:38 ` Jeff Garzik
2004-03-09 17:03 mikem
2004-03-09 22:22 ` 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=404F5CDB.50900@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.miller@hp.com \
    /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.