summaryrefslogtreecommitdiff
path: root/sound/sound_firmware.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-11-05 21:52:55 +0300
committerArnd Bergmann <arnd@arndb.de>2009-12-11 00:52:11 +0300
commit661f627da98c0647bcc002ef35e5441fb3ce667c (patch)
tree0820ff0d1734edb252c0073babf7806614a8fa55 /sound/sound_firmware.c
parent789f0f89118a80a3ff5309371e5820f623ed2a53 (diff)
downloadlinux-661f627da98c0647bcc002ef35e5441fb3ce667c.tar.xz
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 'sound/sound_firmware.c')
0 files changed, 0 insertions, 0 deletions