Quantcast
Viewing all articles
Browse latest Browse all 1267

Re: printk: what is going on with additional newlines?

Linus Torvalds writes: (Summary) oh, and workqueues etc.
And the end result would be that you'd be very limited in where you can actually expect buffering to happen.
can actually expect buffering to happen.
Which is all a bad design, since just making the buffer explicit is (a) cheaper and (b) better. Now you can put the buffer on the stack, you never have to worry about where you need to track context, and you have no buffering limits (ie you can buffer across any event).

[...]

view that we try to call kmalloc()
I think there might be situations where you want to do that, but since we're talking _printing_, we also know that the buffering normally is about a single line.
about a single line.
Sure, some situations might want to buffer more before they print out (perhaps you want to have guarantees that the register state of an oops never gets mixed up with anything else, or whatever), and maybe sometimes you'd want bigger lines.
sometimes you'd want bigger lines.
But I definitely suspect that "

Viewing all articles
Browse latest Browse all 1267

Trending Articles