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