public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Daniel Phillips <phillips@arcor.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: DAC960 Bitrot
Date: Wed, 24 Jul 2002 16:39:31 +0200	[thread overview]
Message-ID: <20020724143931.GG5159@suse.de> (raw)
In-Reply-To: <E17WlGV-00052g-00@starship>

On Tue, Jul 23 2002, Daniel Phillips wrote:
> On Thursday 11 July 2002 12:08, Jens Axboe wrote:
> > On Thu, Jul 11 2002, Daniel Phillips wrote:
> > > On Thursday 11 July 2002 08:47, Jens Axboe wrote:
> > > > Leonard has promised me to convert DAC960 to the "new" pci dma api for
> > > > years (or so it seems, actual date may vary, no purchase necessary). I
> > > > do have a Mylex controller here myself these days, so it's not
> > > > completely impossible that I may do it on a rainy day.
> > > 
> > > Well, tell me what the new api is and I'll dive in there.  For the record,
> > 
> > Documentation/DMA-mapping.txt. Also, DAC960 initial bio conversion
> > happened before the interface was finalized, so it may need changes in
> > that regard as well. Documentation/block/biodoc.txt is your friend there
> > :-)
> > 
> > a quick make drivers/block/DAC960.o shows the following stuff needs
> > changing immediately:
> > 
> > 1) q->queue_lock is a pointer to a lock, not the lock itself. Probably
> > add a per-controller spinlock to DAC960_Controller_T, and pass that to
> > blk_init_queue(). Then change DAC960_AcquireControllerLock and friends
> > in DAC960.h accordingly.
> 
> The big change here appears to be the move to per-device request queues.  
> Somebody apparently already started to update this driver (you?) but 
> obviously didn't try to compile it.  This is new territory for me, so I'll be 
> moving gingerly in here for a while.

Well not really, DAC960 is still using the default per-major queues. But
switching to per-device queue would definitely be a Really Good Idea.
The only changes I did to this driver where trivial conversions in the
2.5.1-pre days, in fact even before multi-page bio's existed. This,
btw, is also something you should keep an eye out for -- multi-page bio
support is currently broken. I would suggest also moving DAC960 to the
pci dma api (this is a must) and then move it to use the generic block
helpers for mapping requests. That way there isn't a lot of nasty
duplication there as well, plus it will automatically get the multi-page
issues right.

> For those locks, I just removed the &'s, which seems like the right thing to 
> do.   The "Controller" lock really seems to be a request queue lock.  Now I 
> think I need to allocate and initialize a request queue, possibly in 
> DAC960_CreateAuxiliaryStructures.  Am I getting warm?

If you move the queues to be per-device, then yes you can use the
Controller lock for the queue lock as well. It was made that way for
easy conversions. So basically embed a request_queue_t inside the
DAC960_Controller_T (god damnit, I'm having a hard time even just
writing these ugly names down here :-) and do something ala

	RequestQueue = = &Controller->ThisIsTheQueueYouAdded;
	spin_lock_init(&Controller->ThisIsTheLockYouAdded);
	blk_init_queue(RequestQueue, DAC960_RequestFunction, &Controller->ThisIsTheLockYouAdded);
	RequestQueue->queuedata = Controller;
	...

Hmm, is DAC960 using a full major per controller?!

But... This is the least of your worries. The major issue here is
updating it to the pci dma api. Once that is done, the rest is trivial
and will actually consist mainly of removing code, not adding.

-- 
Jens Axboe


  reply	other threads:[~2002-07-24 14:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-06  5:31 [PATCH][RFT](2) minimal rmap for 2.5 - akpm tested Rik van Riel
2002-07-06  6:28 ` Andrew Morton
2002-07-06 19:06   ` Linus Torvalds
2002-07-06 20:00     ` Andrew Morton
2002-07-06 20:11       ` Linus Torvalds
2002-07-10 17:35 ` Sebastian Droege
2002-07-10 20:42   ` Rik van Riel
2002-07-10 21:56     ` Daniel Phillips
2002-07-11  6:47       ` Jens Axboe
2002-07-11  9:58         ` Daniel Phillips
2002-07-11 10:08           ` Jens Axboe
2002-07-22 22:02             ` DAC960 Bitrot Daniel Phillips
2002-07-24 14:39               ` Jens Axboe [this message]
2002-07-24 14:48                 ` Jens Axboe
2002-07-24 16:19                 ` Wakko Warner
2002-07-24 16:57                 ` Daniel Phillips
2002-07-24 17:02                   ` Jens Axboe
2002-07-24 17:30                     ` Alexander Viro

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=20020724143931.GG5159@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@arcor.de \
    /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