aboutsummaryrefslogtreecommitdiff
path: root/fs/jfs/endian24.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-11-05 19:52:55 +0100
committerArnd Bergmann <arnd@arndb.de>2009-12-10 22:52:11 +0100
commit661f627da98c0647bcc002ef35e5441fb3ce667c (patch)
tree0820ff0d1734edb252c0073babf7806614a8fa55 /fs/jfs/endian24.h
parent789f0f89118a80a3ff5309371e5820f623ed2a53 (diff)
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/jfs/endian24.h')
0 files changed, 0 insertions, 0 deletions