Thread (33 messages) 33 messages, 4 authors, 2018-05-31

Re: [PATCH -next 0/6] rhashtable: guarantee first allocation

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2018-05-24 21:42:01
Also in: lkml

On Thu, May 24, 2018 at 2:28 PM Davidlohr Bueso [off-list ref] wrote:
  10 files changed, 79 insertions(+), 86 deletions(-)
I certainly can't complain about this small code removal, but I think if we
did the kvmalloc_node() cleanup, we'd be able to get rid of even more.

For example, bucket_table_alloc() does that

         if (gfp != GFP_KERNEL)
                 tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY);
         else
                 tbl = kvzalloc(size, gfp);

purely due to the kvalloc_node() oddity. Wouldn't it be nice to just write
it as

         tbl = kvzalloc(size, gfp);

knowing that the whole point of all the kv*alloc*() functions is to "just
do the right thing given size, gpf mask, and ease of allocation".

             Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help