linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: What's in libata-dev.git?
Date: Sun, 13 Sep 2009 01:01:29 -0600	[thread overview]
Message-ID: <4AAC98C9.3050005@gmail.com> (raw)
In-Reply-To: <20090911064246.GA8422@havoc.gtf.org>

On 09/11/2009 12:42 AM, Jeff Garzik wrote:
>
> This is a summary of the changes current queued on the #upstream branch
> of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
>
> These will be pushed to Linus in the next day or so, when merges start
> flowing.
>
> linux-ide hackers, speak up is something is obviously wrong or missing.
>
> The only outstanding patch is Robert Hancock's enhance-command-parsing
> patch:  I'm still on the fence about leaving the huge switch table, or
> choosing a better data structure.

I just tried implementing some table-based code to achieve something 
like what the patch I posted was doing. The combined code+data size was 
only marginally smaller (about a 3K increase versus 4K with the switch 
version), the function was about the same number of lines, it would be 
slower (scanning through a table rather than the compiler-generated jump 
table, though it's not like it's used on a hot path anyway) and it's 
also less flexible. Particularly with some weird commands (like the way 
they seem to be heading with the DATA SET MANAGEMENT command where the 
feature register is being used as a bitmask instead of a simple command 
code), it would be a lot simpler to implement that in a switch statement 
rather than having to modify an entire table structure to accommodate it.

So essentially my advocated patch is unchanged after that experiment. It 
may not be the prettiest thing in the world, but I'm not sure it really 
gets much better..

  reply	other threads:[~2009-09-13  7:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11  6:42 What's in libata-dev.git? Jeff Garzik
2009-09-13  7:01 ` Robert Hancock [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-12-03  7:56 Jeff Garzik
2009-12-03 15:47 ` Bartlomiej Zolnierkiewicz
2009-12-03 19:14   ` Jeff Garzik
2009-12-03 19:20     ` Bartlomiej Zolnierkiewicz
2009-12-03 19:40       ` Jeff Garzik
2007-09-08 17:41 Jeff Garzik
2007-04-17 17:04 Jeff Garzik
2007-04-17 17:08 ` 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=4AAC98C9.3050005@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=jeff@garzik.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).