Re: [PATCH 1/4] printk: Allocate kernel log buffer earlier

From: Ingo Molnar
Date: Tue Mar 01 2011 - 02:35:53 EST



* Mike Travis <travis@xxxxxxx> wrote:

> Ingo Molnar wrote:
> >* Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> >
> >>+ pr_info("log_buf_len: %d\n", log_buf_len);
> >>+ pr_info("early log buf free: %d(%d%%)\n",
> >>+ free, (free * 100) / __LOG_BUF_LEN);
> >
> > Such debug printks should be removed from the final version of the patch ...
>
> Because I haven't been able to test on a fully configured
> system, this might be crucial info to figure out how to
> fix this when it happens on a customer system. Are you
> saying this small line is any less important than the
> other thousands and thousands of seemingly meaningless
> lines?

I think you are thinking about this the wrong way.

The real fix is to never even have to think about 'how much early buffer space do we
have left'. I.e. via the memblock allocation the buffer can be enlargened before the
big printks happen.

btw., a sidenote, it would make sense to record cases when we 'lose' printk output,
in the printk buffer itself. (it can be done by reserving a bit and updating the
'lost this many bytes' portion of the buffer, or so.)

Thanks,

Ingo
--
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/