From: Asai Thambi S P <asamymuthupa@micron.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Moyer <jmoyer@redhat.com>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Garzik <jgarzik@redhat.com>
Subject: Re: New driver mtipx2xx submission
Date: Fri, 29 Jul 2011 12:13:47 -0600 [thread overview]
Message-ID: <4E32F85B.3060800@micron.com> (raw)
In-Reply-To: <20110726114640.2b05dd34@lxorguk.ukuu.org.uk>
On 7/26/2011 4:46 AM, Alan Cox wrote:
> Sorry this has taken a while - I've been away and also dealing with
> various bits of graphics security stuff.
>
> I've now been through the errata, the timing data and the driver code in
> somewhat more detail
>
> Overall:
> The hardware deviates a bit from AHCI. The AHCI driver could be taught
> to support it but even with the longer queue supported it's not clear
> this is the right path, and some of the error handling needs deviate a
> bit.
>
> The performance numbers are pretty definitive, and the data shows that
> is mostly higher up in the queue handling. That's awkward in some ways
> because it means there isn't an obvious way to fix it, and we still
> want the queue stuff for 'normal' disks.
>
> Looking at other vendors there don't seem to be a pile of them also
> planning to do AHCI with extras instead most seem focussed on NVHMCI so
> it doesn't look like a pile of near identikit drivers will appear. Also
> if they do we would probably want them all to be related to this driver
> not to the general AHCI driver.
>
> So having gone over it all I think the case is rather well made for this
> being added as its own driver matching their specific PCI idents, but with
> some code clean up, and possibly some further compatibility code if it
> turns out some general ide/scsi tools don't work on it as expected.
>
> Comments on the driver code
>
> Questions:
> Should there be security checks on the ioctl interfaces ?
>
> Code:
> Use k[mz]alloc/kfree for small objects like structs, vmalloc has a lot
> of ovherad you don't need
>
> - Lots of global function names with general naming. This causes problems
> in Linux because all the compiled in drivers share a common namespace.
> So they really ought to be something like
>
> mtip_ahci_write()
>
> and so on
>
> - Semaphores. Unless you need the counting properties please use mutexes.
> Sempahores really make for problems in hard real time environments if
> using the -rt kernel additions
>
> Style:
> - Confuses our kernel-doc tools as it has its own different comment
> extraction format. That wants pulling into line (it looks like all the
> info is there and its a 'perl script from hell' sort of conversion)
>
> - Various struct names in capitals - please search/replace those as for
> style we keep capitals for defines
>
> - Various ifdefs and a lot of printk stuff. Some of this is clearly
> because its a development driver, but it ought to be tidied for a final
> submission. Also use of dev_info/dev_err etc is strongly preferred as
> it means a user and tools can clearly identify which device generated
> the message (dev_dbg() supports runtime debug switching so may also
> deal with stuff you'd otherwise remove later)
>
> - for ata_swap_string look at bswap()
Thanks for your valuable feedback. We started making changes to the
driver, and expect to complete it soon.
--
Regards,
Asai Thambi
WARNING: multiple messages have this Message-ID (diff)
From: Asai Thambi S P <asamymuthupa@micron.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Moyer <jmoyer@redhat.com>, <linux-ide@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Jeff Garzik <jgarzik@redhat.com>
Subject: Re: New driver mtipx2xx submission
Date: Fri, 29 Jul 2011 12:13:47 -0600 [thread overview]
Message-ID: <4E32F85B.3060800@micron.com> (raw)
In-Reply-To: <20110726114640.2b05dd34@lxorguk.ukuu.org.uk>
On 7/26/2011 4:46 AM, Alan Cox wrote:
> Sorry this has taken a while - I've been away and also dealing with
> various bits of graphics security stuff.
>
> I've now been through the errata, the timing data and the driver code in
> somewhat more detail
>
> Overall:
> The hardware deviates a bit from AHCI. The AHCI driver could be taught
> to support it but even with the longer queue supported it's not clear
> this is the right path, and some of the error handling needs deviate a
> bit.
>
> The performance numbers are pretty definitive, and the data shows that
> is mostly higher up in the queue handling. That's awkward in some ways
> because it means there isn't an obvious way to fix it, and we still
> want the queue stuff for 'normal' disks.
>
> Looking at other vendors there don't seem to be a pile of them also
> planning to do AHCI with extras instead most seem focussed on NVHMCI so
> it doesn't look like a pile of near identikit drivers will appear. Also
> if they do we would probably want them all to be related to this driver
> not to the general AHCI driver.
>
> So having gone over it all I think the case is rather well made for this
> being added as its own driver matching their specific PCI idents, but with
> some code clean up, and possibly some further compatibility code if it
> turns out some general ide/scsi tools don't work on it as expected.
>
> Comments on the driver code
>
> Questions:
> Should there be security checks on the ioctl interfaces ?
>
> Code:
> Use k[mz]alloc/kfree for small objects like structs, vmalloc has a lot
> of ovherad you don't need
>
> - Lots of global function names with general naming. This causes problems
> in Linux because all the compiled in drivers share a common namespace.
> So they really ought to be something like
>
> mtip_ahci_write()
>
> and so on
>
> - Semaphores. Unless you need the counting properties please use mutexes.
> Sempahores really make for problems in hard real time environments if
> using the -rt kernel additions
>
> Style:
> - Confuses our kernel-doc tools as it has its own different comment
> extraction format. That wants pulling into line (it looks like all the
> info is there and its a 'perl script from hell' sort of conversion)
>
> - Various struct names in capitals - please search/replace those as for
> style we keep capitals for defines
>
> - Various ifdefs and a lot of printk stuff. Some of this is clearly
> because its a development driver, but it ought to be tidied for a final
> submission. Also use of dev_info/dev_err etc is strongly preferred as
> it means a user and tools can clearly identify which device generated
> the message (dev_dbg() supports runtime debug switching so may also
> deal with stuff you'd otherwise remove later)
>
> - for ata_swap_string look at bswap()
Thanks for your valuable feedback. We started making changes to the
driver, and expect to complete it soon.
--
Regards,
Asai Thambi
next prev parent reply other threads:[~2011-07-29 18:14 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 15:53 New driver mtipx2xx submission Asai Thambi Samymuthu Pattrayasamy (asamymuthupa) [CONTRACTOR]
2011-04-28 22:06 ` Alan Cox
2011-05-02 12:40 ` Asai Thambi Samymuthu Pattrayasamy (asamymuthupa) [CONTRACTOR]
2011-05-02 17:42 ` Alan Cox
2011-05-03 20:07 ` [PATCH 0/3] " Asai Thambi Samymuthu Pattrayasamy (asamymuthupa) [CONTRACTOR]
2011-05-11 17:40 ` Asai Thambi Samymuthu Pattrayasamy (asamymuthupa) [CONTRACTOR]
2011-05-11 19:20 ` Alan Cox
2011-05-21 2:26 ` Asai Thambi S P
2011-05-25 14:36 ` Jeff Moyer
[not found] ` <22A973199D2C2F46933448F6E7990A300239EA77@ntxboimbx31.micron.com>
2011-06-01 19:51 ` Jeff Moyer
2011-06-01 20:21 ` Alan Cox
2011-06-15 1:29 ` Asai Thambi S P
2011-06-15 14:43 ` Jeff Moyer
2011-06-27 23:38 ` Asai Thambi Samymuthu Pattrayasamy (asamymuthupa) [CONTRACTOR]
2011-06-28 15:18 ` Jeff Moyer
2011-06-28 15:31 ` Alan Cox
2011-06-28 15:38 ` Jeff Moyer
2011-07-06 21:43 ` Asai Thambi S P
2011-07-07 7:37 ` Alan Cox
2011-07-26 10:46 ` Alan Cox
2011-07-26 10:46 ` Alan Cox
2011-07-26 11:44 ` Christoph Hellwig
2011-07-26 11:49 ` Alan Cox
2011-07-26 18:50 ` Jeff Garzik
2011-07-29 18:13 ` Asai Thambi S P [this message]
2011-07-29 18:13 ` Asai Thambi S P
2011-08-11 18:36 ` Asai Thambi S P
2011-08-11 18:36 ` Asai Thambi S P
2011-07-06 21:39 ` Asai Thambi S P
2011-06-02 1:21 ` David Dillow
2011-06-15 1:33 ` Asai Thambi S P
2011-06-15 3:12 ` David Dillow
2011-05-02 18:40 ` Jeff Moyer
2011-05-02 18:52 ` Alan Cox
2011-05-03 15:04 ` Mark Lord
2011-05-03 15:07 ` Alan Cox
2011-05-03 15:08 ` Mark Lord
2011-05-03 15:02 ` Mark Lord
2011-05-12 14:39 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2011-05-03 11:09 Jordan_Hargrave
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=4E32F85B.3060800@micron.com \
--to=asamymuthupa@micron.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@redhat.com \
--cc=jmoyer@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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.