summaryrefslogtreecommitdiffstats
path: root/lib/hweight.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-05-09 00:57:18 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-09 02:15:12 +0200
commit43ca5bc4f72ed22e6e20feabdd3eab3c721d98cd (patch)
tree249105f7324508432b7c242929349ed164f16d38 /lib/hweight.c
parentmm: support __GFP_REPEAT in kvmalloc_node for >32kB (diff)
downloadlinux-43ca5bc4f72ed22e6e20feabdd3eab3c721d98cd.tar.xz
linux-43ca5bc4f72ed22e6e20feabdd3eab3c721d98cd.zip
lib/rhashtable.c: simplify a strange allocation pattern
alloc_bucket_locks allocation pattern is quite unusual. We are preferring vmalloc when CONFIG_NUMA is enabled. The rationale is that vmalloc will respect the memory policy of the current process and so the backing memory will get distributed over multiple nodes if the requester is configured properly. At least that is the intention, in reality rhastable is shrunk and expanded from a kernel worker so no mempolicy can be assumed. Let's just simplify the code and use kvmalloc helper, which is a transparent way to use kmalloc with vmalloc fallback, if the caller is allowed to block and use the flag otherwise. Link: http://lkml.kernel.org/r/20170306103032.2540-4-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Tom Herbert <tom@herbertland.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/hweight.c')
0 files changed, 0 insertions, 0 deletions