Thread (25 messages) flat view 25 messages, 5 authors, 10d ago

Re: [PATCH 2/4] char: xillybus: replace __get_free_pages() with kmalloc()

From: Eli Billauer <eli.billauer@gmail.com>
Date: 2026-09-02 11:40:41
Also in: linux-arm-kernel, linux-mm, lkml

On 01/09/2026 19:24, Mike Rapoport wrote:
On Tue, Sep 01, 2026 at 10:42:47AM +0200, Eli Billauer wrote:
quoted
On 31/08/2026 13:32, Mike Rapoport wrote:
quoted
For large sizes kmalloc falls back to page allocator anyway.

And the doc is out of date unfortunately.
I think it would be a good idea to update the doc first, and by doing so
officially change the API. After getting this change approved, it's indeed
safe to rely on kmalloc() even for larger memory allocations.
The documentation always lags behind the code and "official" API is what
include/linux/slab.h says :)
This is what I found in slab.h:

  *
  * kmalloc is the normal method of allocating memory
  * for objects smaller than page size in the kernel.
  *

Maybe this needs a clarification too?

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