lkml.org 
[lkml]   [2018]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 1/3] printk: Add line-buffered printk() API.
On Fri, Nov 02, 2018 at 10:31:55PM +0900, Tetsuo Handa wrote:
> get_printk_buffer() tries to assign a "struct printk_buffer" from
> statically preallocated array. get_printk_buffer() returns NULL if
> all "struct printk_buffer" are in use, but the caller does not need to
> check for NULL.

This seems like a great way of wasting 16kB of memory. Since you've
already made printk_buffered() work with a NULL initial argument, what's
the advantage over just doing kmalloc(1024, GFP_ATOMIC)?

\
 
 \ /
  Last update: 2018-11-02 15:41    [W:0.234 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site