Re: What's in libata-dev.git?

From: Robert Hancock
Date: Sun Sep 13 2009 - 03:01:43 EST


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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/