# Re: \[PATCH 2/4\] char: xillybus: replace \_\_get\_free\_pages() with kmalloc()

- From: Eli Billauer \<eli.billauer@gmail.com\>
- Date: 2026-09-04 15:29:21 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2026/09/17515144
- Thread: https://ratatoskr.run/linux-mm/2026/08/17479130/t.md

```text
On 03/09/2026 16:28, Vlastimil Babka (SUSE) wrote:
>> Replacing it with a kmalloc() is confusing in my opinion, and requires
>> that the reader is aware that kmalloc() falls back to __get_free_pages()
> Why? The reader has only to know that kmalloc() will provide such a buffer
> (up to sizes that the page allocator would) and whether it falls back to the
> page allocator or not is an implementation detail.

When I see __get_free_pages(), I automatically assume there is some ugly low-level memory management going on, which is exactly what fifo_init() does. kmalloc() feels like something you use more for allocating memory for a struct. There is no such rule, of course, but this is my subjective view on these two functions. As I wrote earlier, this is a matter of taste. Maybe it's only me thinking like that.

And as I'm not the one deciding whether this patch is applied or not, it doesn't matter so much what I think about this matter. I've humbly voiced my opinion, and that's about as much as I can do.

Regards,
   Eli

```
