<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/kconfig/expr.h, branch v2.6.35</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.35</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.35'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-02-02T13:33:55Z</updated>
<entry>
<title>Improve kconfig symbol hashing</title>
<updated>2010-02-02T13:33:55Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-13T16:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e66f25d7d1be19e177cf55126a40799757efae89'/>
<id>urn:sha1:e66f25d7d1be19e177cf55126a40799757efae89</id>
<content type='text'>
While looking for something else I noticed that the symbol
hash function used by kconfig is quite poor. It doesn't
use any of the standard hash techniques but simply
adds up the string and then uses power of two masking,
which is both known to perform poorly.

The current x86 kconfig has over 7000 symbols.

When I instrumented it showed that the minimum hash chain
length was 16 and a significant number of them was over
30.

It didn't help that the hash table size was only 256 buckets.

This patch increases the hash table size to a larger prime
and switches to a FNV32 hash. I played around with a couple of hash
functions, but that one seemed to perform best with reasonable
hash table sizes.

Increasing the hash table size even further didn't
seem like a good idea, because there are a couple of global
walks which walk the complete hash table.

I also moved the unnamed bucket to 0. It's still the longest
of all the buckets (44 entries), but hopefully it's not
often hit except for the global walk which doesn't care.

The result is a much nicer distribution:
(first column bucket length, second number of buckets with that length)

1: 3505
2: 1236
3: 294
4: 52
5: 3
47: 1		&lt;--- this is the unnamed symbols bucket

There are still some 5+ buckets, but increasing the hash table
even more would be likely not worth it.

This also cleans up the code slightly by removing hard coded
magic numbers.

I didn't notice a big performance difference either way
on my Nehalem system, but I presume it'll help somewhat
on slower systems.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>kconfig: struct property commented</title>
<updated>2009-01-02T19:43:21Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-12-26T20:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf82607a904d3b2ed3d66f8799f00d1099c1849c'/>
<id>urn:sha1:cf82607a904d3b2ed3d66f8799f00d1099c1849c</id>
<content type='text'>
No functional changes

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kconfig: add comments to symbol flags</title>
<updated>2009-01-02T19:43:21Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-12-26T20:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b2cf365a8e9bbf781939e941ed548c9743fdeea'/>
<id>urn:sha1:5b2cf365a8e9bbf781939e941ed548c9743fdeea</id>
<content type='text'>
No functional changes - only comments.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kconfig: explain symbol value defaults</title>
<updated>2009-01-02T19:43:20Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-12-26T20:07:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eaa2a87460eca27ce725d63bbcf3b2da053828b7'/>
<id>urn:sha1:eaa2a87460eca27ce725d63bbcf3b2da053828b7</id>
<content type='text'>
Added a few comments - no functional change.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kconfig: environment symbol support</title>
<updated>2008-01-28T22:14:39Z</updated>
<author>
<name>Roman Zippel</name>
<email>zippel@linux-m68k.org</email>
</author>
<published>2008-01-14T03:50:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93449082e905ce73d0346d617dd67c4b668b58af'/>
<id>urn:sha1:93449082e905ce73d0346d617dd67c4b668b58af</id>
<content type='text'>
Add the possibility to import a value from the environment into kconfig
via the option syntax. Beside flexibility this has the advantage
providing proper dependencies.
Documented the options syntax.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kconfig: explicitly introduce expression list</title>
<updated>2008-01-28T22:14:39Z</updated>
<author>
<name>Roman Zippel</name>
<email>zippel@linux-m68k.org</email>
</author>
<published>2008-01-14T03:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a962923359768e04137125bd479fd0dfa6117d3'/>
<id>urn:sha1:7a962923359768e04137125bd479fd0dfa6117d3</id>
<content type='text'>
Rename E_CHOICE to E_LIST to explicitly add support for expression
lists. Add a helper macro expr_list_for_each_sym to more easily iterate
over the list.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kconfig: delete unused FILE_ and SYMBOL_ flags</title>
<updated>2008-01-28T22:14:38Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-01-07T20:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de83cf148aaefac8a538a076f2c3c4f33968e04a'/>
<id>urn:sha1:de83cf148aaefac8a538a076f2c3c4f33968e04a</id>
<content type='text'>
The *_PRINTED flags were never used - so delete them.
Do we need them later then we can re-add them.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>kconfig: rename E_OR &amp; friends to avoid name clash</title>
<updated>2008-01-28T22:14:38Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-01-07T20:09:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6ee35764f270c699e165b15dc59f4e55546bfda'/>
<id>urn:sha1:d6ee35764f270c699e165b15dc59f4e55546bfda</id>
<content type='text'>
We had macros named the same as a set of enumeration values.
It is legal code but very confusing to read - so rename
the macros from E_* to EXPR_*

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>kconfig: remove unused members from struct symbol</title>
<updated>2007-07-25T19:14:30Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2007-07-20T22:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1edf1c00acf8d9b60d436d6a0a55e395353a446c'/>
<id>urn:sha1:1edf1c00acf8d9b60d436d6a0a55e395353a446c</id>
<content type='text'>
dep and dep2 in struct symbol was unused - remove them.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>kconfig: attach help text to menus</title>
<updated>2007-07-25T19:14:26Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2007-07-20T22:00:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03d29122738f0bd81afd44b1f566e64ebf8d06fe'/>
<id>urn:sha1:03d29122738f0bd81afd44b1f566e64ebf8d06fe</id>
<content type='text'>
Roman Zippel wrote:
&gt; A simple example would be
&gt; help texts, right now they are per symbol, but they should really be per
&gt; menu, so archs can provide different help texts for something.

This patch does this and at the same time introduce a few API
funtions used to access the help text.

The relevant api functions are introduced in the various frontends.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
</content>
</entry>
</feed>
