Re: [RFC 00/11] mm: debug: formatting memory management structs

From: Sasha Levin
Date: Wed Apr 15 2015 - 08:53:24 EST


On 04/15/2015 04:45 AM, Kirill A. Shutemov wrote:
> On Tue, Apr 14, 2015 at 04:56:22PM -0400, Sasha Levin wrote:
>> > This patch series adds knowledge about various memory management structures
>> > to the standard print functions.
>> >
>> > In essence, it allows us to easily print those structures:
>> >
>> > printk("%pZp %pZm %pZv", page, mm, vma);
> Notably, you don't have \n in your format line. And it brings question how
> well dump_page() and friends fit printk-like interface. dump_page()
> produces multi-line print out.
> Is it something printk() users would expect?

Since were printing large amount of data out of multiple fields (rather than just
one potentially long field like "path"), the way I see it we could print it in one
line, and let it wrap.

While this is what printk users would most likely expect in theory, in practice it
might scroll off the screen, making us miss important output, it would also be awkward
making that long line part of anything else; what else would you add there?

While if we break it up into multiple lines, we keep it working the same way it worked
so far. Also, using any of those new printk format specifiers wouldn't be too common, so
we can hope that whoever uses them knows what he's doing and how the output will look
like.

Is there a usecase where we'd want to keep it as a single line?


Thanks,
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/