Video adapter resuming
Richard Hughes
hughsient at gmail.com
Tue Nov 28 09:34:19 PST 2006
On Tue, 2006-11-28 at 12:17 -0500, David Zeuthen wrote:
> On Tue, 2006-11-28 at 00:01 +0000, Richard Hughes wrote:
> > Okay, can you have a look at the sample file attached, and tell me what
> > you guys think.
> >
> > I'm in two mind about the 'contains=' match - I know computationally
> > strstr is bigger compared to strcmp, but I'm trying to do as much binary
> > division (by nesting the match statements) as possible to make the whole
> > structure fit in as little amount of memory as possible.
>
> At some point we're going to make the compiled fdi files reside in a
> file we can mmap read-only so it's not really going to be dirty/writable
> memory. As such, I wouldn't worry too much about the size though it's
> always good to make things as small and simple as possible.
>
> > Plus, with the new fdi matching, we should jump out of any non-matching
> > branches fast, avoiding most of the contains= lines. I think the nested
> > way is to go, in preference to doing a linear lookup of products.
> >
> > What do you think?
>
> Looks good to me. Please commit this and other fdi quirk files. Thanks!
I've thought of a better idea. Instead of using contains= we should
really use prefix= and suffix= as I really need to match "DELL*" or
"*1255" - this would make the matching a whole lot quicker as well.
As I'm going to be adding *lots* of data, I think it's best we make this
as fast as possible. What do you think?
<!ELEMENT match (match|merge|prepend|append|remove|spawn)* >
<!ATTLIST match
key CDATA #REQUIRED
string CDATA #IMPLIED
int CDATA #IMPLIED
bool (false|true) #IMPLIED
exists (false|true) #IMPLIED
empty (false|true) #IMPLIED
is_ascii (false|true) #IMPLIED
is_absolute_path (false|true) #IMPLIED
contains CDATA #IMPLIED
contains_ncase CDATA #IMPLIED
compare_lt CDATA #IMPLIED
compare_le CDATA #IMPLIED
compare_gt CDATA #IMPLIED
compare_ge CDATA #IMPLIED
>
I can quickly add another entry for prefix and suffix if you like, and
add it to the fdi parsing file also.
> Any chance we can get a pm-utils release that uses this anytime soon
> btw? We'll need it for the 0.5.9 release scheduled for Dec 15 2006.
Peter?
Richard.
More information about the hal
mailing list