linux/include/asm-generic
Hannes Frederic Sowa e5a2c89995 fast_hash: avoid indirect function calls
By default the arch_fast_hash hashing function pointers are initialized
to jhash(2). If during boot-up a CPU with SSE4.2 is detected they get
updated to the CRC32 ones. This dispatching scheme incurs a function
pointer lookup and indirect call for every hashing operation.

rhashtable as a user of arch_fast_hash e.g. stores pointers to hashing
functions in its structure, too, causing two indirect branches per
hashing operation.

Using alternative_call we can get away with one of those indirect branches.

Acked-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-05 22:01:21 -05:00
..
2014-04-07 16:36:10 -07:00
2011-03-17 09:19:04 +08:00
2014-09-23 17:51:39 +02:00
2010-10-07 14:08:55 +01:00
2010-10-07 14:08:55 +01:00
2012-10-02 18:01:56 +01:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2012-12-09 23:14:14 +01:00
2013-01-03 15:57:16 -08:00
2012-02-23 20:19:04 -07:00
2014-06-17 19:12:40 -04:00
2014-05-15 00:32:09 +01:00
2014-03-14 18:02:08 +00:00
2013-11-09 00:16:29 -05:00
2012-11-29 00:01:23 -05:00
2013-02-14 09:21:15 -05:00