diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-11-05 19:52:55 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2009-12-10 22:52:11 +0100 |
commit | 661f627da98c0647bcc002ef35e5441fb3ce667c (patch) | |
tree | 0820ff0d1734edb252c0073babf7806614a8fa55 /fs/dlm | |
parent | 789f0f89118a80a3ff5309371e5820f623ed2a53 (diff) | |
download | linux-661f627da98c0647bcc002ef35e5441fb3ce667c.tar.gz linux-661f627da98c0647bcc002ef35e5441fb3ce667c.tar.bz2 linux-661f627da98c0647bcc002ef35e5441fb3ce667c.zip |
compat_ioctl: simplify lookup table
The compat_ioctl table now only contains entries for
COMPATIBLE_IOCTL, so we only need to know if a number
is listed in it or now.
As an optimization, we hash the table entries with a
reversible transformation to get a more uniform distribution
over it, sort the table at startup and then guess the
position in the table when an ioctl number gets called
to do a linear search from there.
With the current set of ioctl numbers and the chosen
transformation function, we need an average of four
steps to find if a number is in the set, all of the
accesses within one or two cache lines.
This at least as good as the previous hash table
approach but saves 8.5 kb of kernel memory.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/dlm')
0 files changed, 0 insertions, 0 deletions