Re: [PATCH] udevd: Shrink struct token to 12 bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 6, 2008 at 00:04, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote:
> Kay Sievers wrote:
>>
>> On Wed, Nov 5, 2008 at 20:55, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>
>> wrote:
>>
>>>
>>> Signed-off-by: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>
>>>
>>> diff --git a/udev/udev-rules.c b/udev/udev-rules.c
>>>
>>
>> I liked the 16 byes, and now we can have only 255 keys per rule. :)
>>
>
> Hmm, that wasn't my intention.  rule.token_count is a short so it should be
> good for 64k.  You'd hit the line buffer limit first.

Ah, you are right, it's a short. Yeah, even with 255 we would hit the
line buffer probably. :)

>> I get now with: "shrunk to 81012 bytes tokens (6751 * 12 bytes), 68009
>> bytes buffer". Maybe we should check the duplicates in the strings and
>> tail of strings while parsing, we can get rid of another 20kb, I
>> guess. :)
>>
>
> Not sure about the O(n^2) scanning though.  I tried a trie, but it's 100+
> lines of dense C and needs a hundred K or so during parsing - it just seemed
> like overkill.  It did shave ~15K off my ~25K string buffer.  I can send it
> if you like.

Hmm, maybe it's not worth, and may cost too much at bootup. But if you
have it working, I would like to see how much it is here. But don't
bother if it's too much effort, we will probably not apply that.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux