All of lore.kernel.org
 help / color / mirror / Atom feed
From: 'Christoph Hellwig' <hch@infradead.org>
To: "Mukker, Atul" <Atulm@lsil.com>
Cc: 'Christoph Hellwig' <hch@infradead.org>,
	"'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>
Subject: Re: [ANNOUNCE]: megaraid driver version 2.20.0.rc2
Date: Thu, 24 Jun 2004 10:46:51 +0100	[thread overview]
Message-ID: <20040624094651.GA6945@infradead.org> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E57033BC7B5@exa-atlanta>

On Wed, Jun 23, 2004 at 11:45:14PM -0400, Mukker, Atul wrote:
> >  - I don't think megaraid is widely enough used for the default y/m lines
> 
> still needs fixing
> 
> AM> The statement is wrong. MegaRAID *is* a very widely used controller

Umm, of course.  But the default statements are usually only for things
which are nessecary to get a working ssystem.  E.g. the much more widely
used Intel PIIX or VIA IDE controller drivers found on just about every
motherboard don't have a default statement either.

> >  - the macros in kdep.h should go away, and the include in there should
> >    got into the individual source files aswell
> 
> first is ok, the latter only moved to mega_common.h instead of the actual
> source files
> AM> IMO, these subset of original macros make the translation to mid-layer
> to LLD very convenient.

I didn't actually complain about macros, but that the include files aren't
in the individual files.

> >  - MRAID_GET_DEVICE_MAP is far too large for a macro, please make it a
> >    function call or opencode it in the callers
> 
> Still needs to be done.  There's only one caller anyway, so no need for
> the macro
> AM> This code base uses at only one place, but there is another low level
> driver if offing which uses the same definitions. So this should stay.

then please convert it to an inline function.

> 
> >  - any chance to rework megaraid_mbox.c to need less forward-declarations
> >    by reordering the function in their natural order?
> 
> still quite a lot of those.
> AM> Again, this matches with our driver functions layout. If you observe
> closely, the driver functions (well mostly) are laid out in a breadth-first
> approach, with do-undo functions kept together. If this approach does not
> meet general driver guidelines, we will fix it, but next major rev

Well, it's okay, I just asked because I didn't get any feedback on it.

> >  - pci_id_table_g would be much more readable when not using C99
> initializers
> 
> still there.
> 
> AM> NO, foul! It has been corrected

Sorry, my apologies.  I still looked huge beause you have each ID spread
over multiple lines.  

> >  - alloc_adapter_f/init_mbox_f in megaraid_probe_one and use proper gotos
> >    as I did in the old megaraid driver
> 
> still needs to be done.
> 
> AM> I feel, this is a cleaner approach to up-wrap in case something goes
> bad. With goto 'many labels' the place you are going to jump from actually
> wants to undo (possibly unrelated) previous step

You usually want to undo all previous steps, exactly because of that the
goto approach is superior.

> >  - the detach path is bogus.  You need to do scshi_remove_host first
> before
> >    tearing down anything and scsi_host_put last
> 
> still needs to be fixed.
> AM> I must be missing something here. Please elaborate again.

Basic rule for a ->remove routine of a scsi driver is:

Call scsi_remove_host() first, then do all teardown of the hardware and
unregistration of ressources (release_region, iounmap, free_irq, etc..) and
then finally call scsi_host_put.

> >  - your locking looks far to fine-grained to me.  Did you benchmark it?
> >    Where was the bottleneck with a single per-host lock?
> 
> sill applies.
> AM> If fact, the performance did improve on the enterprise kernels with
> fine-grain locks. So, this locking mechanism should stay

Ok, that's why I asked for benchmark numbers.

  reply	other threads:[~2004-06-24  9:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24  3:45 [ANNOUNCE]: megaraid driver version 2.20.0.rc2 Mukker, Atul
2004-06-24  9:46 ` 'Christoph Hellwig' [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-05-28 14:56 Mukker, Atul
2004-05-28 15:06 ` 'Christoph Hellwig'
2004-05-25  4:47 Mukker, Atul
2004-05-28  8:58 ` Andre Tomt
2004-05-28 14:02 ` 'Christoph Hellwig'
2004-06-23 20:33   ` 'Christoph Hellwig'
2004-06-23 20:42     ` Jeff Garzik
2004-06-23 20:48       ` 'Christoph Hellwig'

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=20040624094651.GA6945@infradead.org \
    --to=hch@infradead.org \
    --cc=Atulm@lsil.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 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.