1. 02 2月, 2010 1 次提交
    • A
      Improve kconfig symbol hashing · e66f25d7
      Andi Kleen 提交于
      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		<--- 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: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      e66f25d7
  2. 20 9月, 2009 1 次提交
  3. 29 4月, 2008 2 次提交
  4. 14 2月, 2008 1 次提交
    • R
      kconfig: fix select in combination with default · 587c9061
      Roman Zippel 提交于
      > The attached .config (with current -git) results in a compile
      > error since it contains:
      >
      > CONFIG_X86=y
      > # CONFIG_EMBEDDED is not set
      > CONFIG_SERIO=m
      > CONFIG_SERIO_I8042=y
      >
      > Looking at drivers/input/serio/Kconfig I simply don't get how this
      > can happen.
      
      You've hit the rather subtle rules of select vs default. What happened is
      that SERIO is selected to m, but SERIO_I8042 isn't selected so the default
      of y is used instead.
      We already had the problem in the past that select and default don't work
      well together, so this patch cleans this up and makes the rule hopefully
      more straightforward. Basically now the value is calculated like this:
      
      	(value && dependency) || select
      
      where the value is the user choice (if available and the symbol is
      visible) or default.
      
      In this case it means SERIO and SERIO_I8042 are both set to y due to their
      default and if SERIO didn't had the default, then the SERIO_I8042 value
      would be limited to m due to the dependency.
      
      I tested this patch with more 10000 random configs and above case is the
      only the difference that showed up, so I hope there is nothing that
      depended on the old more complex and subtle rules.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Tested-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      587c9061
  5. 29 1月, 2008 4 次提交
  6. 06 5月, 2007 1 次提交
    • S
      kconfig: error out if recursive dependencies are found · 5447d34b
      Sam Ravnborg 提交于
      Sample:
      config FOO
      	bool "This is foo"
      	depends on BAR
      
      config BAR
      	bool "This is bar"
      	depends on FOO
      
      This will result in following error message:
      error: found recursive dependency: FOO -> BAR -> FOO
      
      And will then exit with exit code equal 1 so make will stop.
      Inspired by patch from: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@stusta.de>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      5447d34b
  7. 14 12月, 2006 1 次提交
  8. 09 6月, 2006 4 次提交
  9. 16 1月, 2006 1 次提交
    • S
      kbuild: create .kernelrelease at *config step · 2244cbd8
      Sam Ravnborg 提交于
      To enable 'make kernelrelease' earlier now create .kernelrelease when
      one of the *config targets are used.
      Also introduce KERNELVERSION - only user is kconfig.
      KERNELVERSION was needed to display kernel version in menuconfig -
      KERNELRELEASE is not valid until configuration has completed.
      kconfig files modified to use KERNELVERSION.
      Bug reported by: Rene Rebe <rene@exactcode.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      2244cbd8
  10. 09 11月, 2005 3 次提交
  11. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4