Linus Torvalds 7e0fb73c52 Merge branch 'hash' of git://ftp.sciencehorizons.net/linux
Pull string hash improvements from George Spelvin:
 "This series does several related things:

   - Makes the dcache hash (fs/namei.c) useful for general kernel use.

     (Thanks to Bruce for noticing the zero-length corner case)

   - Converts the string hashes in <linux/sunrpc/svcauth.h> to use the
     above.

   - Avoids 64-bit multiplies in hash_64() on 32-bit platforms.  Two
     32-bit multiplies will do well enough.

   - Rids the world of the bad hash multipliers in hash_32.

     This finishes the job started in commit 689de1d6ca95 ("Minimal
     fix-up of bad hashing behavior of hash_64()")

     The vast majority of Linux architectures have hardware support for
     32x32-bit multiply and so derive no benefit from "simplified"
     multipliers.

     The few processors that do not (68000, h8/300 and some models of
     Microblaze) have arch-specific implementations added.  Those
     patches are last in the series.

   - Overhauls the dcache hash mixing.

     The patch in commit 0fed3ac866ea ("namei: Improve hash mixing if
     CONFIG_DCACHE_WORD_ACCESS") was an off-the-cuff suggestion.
     Replaced with a much more careful design that's simultaneously
     faster and better.  (My own invention, as there was noting suitable
     in the literature I could find.  Comments welcome!)

   - Modify the hash_name() loop to skip the initial HASH_MIX().  This
     would let us salt the hash if we ever wanted to.

   - Sort out partial_name_hash().

     The hash function is declared as using a long state, even though
     it's truncated to 32 bits at the end and the extra internal state
     contributes nothing to the result.  And some callers do odd things:

      - fs/hfs/string.c only allocates 32 bits of state
      - fs/hfsplus/unicode.c uses it to hash 16-bit unicode symbols not bytes

   - Modify bytemask_from_count to handle inputs of 1..sizeof(long)
     rather than 0..sizeof(long)-1.  This would simplify users other
     than full_name_hash"

  Special thanks to Bruce Fields for testing and finding bugs in v1.  (I
  learned some humbling lessons about "obviously correct" code.)

  On the arch-specific front, the m68k assembly has been tested in a
  standalone test harness, I've been in contact with the Microblaze
  maintainers who mostly don't care, as the hardware multiplier is never
  omitted in real-world applications, and I haven't heard anything from
  the H8/300 world"

* 'hash' of git://ftp.sciencehorizons.net/linux:
  h8300: Add <asm/hash.h>
  microblaze: Add <asm/hash.h>
  m68k: Add <asm/hash.h>
  <linux/hash.h>: Add support for architecture-specific functions
  fs/namei.c: Improve dcache hash function
  Eliminate bad hash multipliers from hash_32() and  hash_64()
  Change hash_64() return value to 32 bits
  <linux/sunrpc/svcauth.h>: Define hash_str() in terms of hashlen_string()
  fs/namei.c: Add hashlen_string() function
  Pull out string hash to <linux/stringhash.h>
2016-05-28 16:15:25 -07:00
..
2016-05-24 11:00:20 -07:00
2016-05-09 16:18:37 +02:00
2016-03-04 23:50:27 -06:00
2016-05-20 14:35:07 -07:00
2016-05-26 09:36:10 -07:00
2016-05-17 12:29:34 -04:00
2016-05-18 13:14:02 -07:00
2015-12-23 08:37:10 -07:00
2016-03-15 16:55:16 -07:00
2016-05-26 19:34:26 -07:00
2016-02-16 13:04:58 -05:00
2016-05-26 20:00:28 -07:00
2016-05-20 21:26:15 -07:00
2016-05-17 15:48:12 -04:00
2015-12-28 13:41:50 +01:00
2015-11-25 09:22:00 -07:00
2016-04-06 13:18:19 +02:00
2016-03-11 14:58:58 -05:00
2016-02-11 09:59:22 -05:00
2016-03-22 15:36:02 -07:00
2016-05-11 19:31:40 -04:00
2016-05-11 22:37:54 +02:00
2016-05-02 09:32:04 -07:00
2016-01-28 14:19:12 -08:00
2016-03-22 15:36:02 -07:00
2016-05-20 21:26:15 -07:00
2016-03-22 15:36:02 -07:00
2016-01-15 17:56:32 -08:00
2016-03-09 15:43:42 -08:00
2016-05-03 15:07:35 -07:00
2016-01-15 17:56:32 -08:00
2016-03-17 13:47:50 -07:00
2016-05-19 19:12:14 -07:00
2016-05-26 15:35:44 -07:00
2016-05-27 15:57:31 -07:00
2016-05-10 23:56:28 -04:00
2016-05-17 15:48:12 -04:00
2016-05-17 15:47:55 -04:00
2016-05-26 10:33:33 -07:00
2016-05-23 17:04:14 -07:00
2016-04-25 15:09:11 -04:00
2016-02-16 13:04:58 -05:00
2016-05-02 09:00:56 -05:00
2016-05-20 14:51:34 -07:00
2016-05-23 17:04:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 13:10:54 -07:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2016-03-14 15:43:11 -04:00
2016-02-16 13:04:58 -05:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-01-10 22:13:15 -05:00
2016-05-26 00:04:58 -04:00
2016-05-26 15:35:44 -07:00
2016-01-04 16:11:11 -05:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-08 23:46:14 -04:00
2016-05-20 17:58:30 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 20:57:27 -07:00
2016-05-23 17:04:14 -07:00
2016-04-07 16:53:29 -04:00
2015-11-23 09:44:58 +01:00
2016-05-20 17:58:30 -07:00
2016-02-22 16:10:08 -07:00
2015-12-03 07:24:29 -08:00