Re: [PATCH 01/20 -v5] printk - dont wakeup klogd with interruptsdisabled

From: Tim Bird
Date: Wed Jan 23 2008 - 12:44:36 EST


Mathieu Desnoyers wrote:
> Can we change this for :
> if (!(irqs_disabled() && !oops_in_progress) && wake_klogd)
> wake_up_klogd();

!oops_in_progress is already inside wake_up_klogd().

Also, I think you'd want that first '!' inside the parens.

I've been working on a system to handle deferred displaying
of printk messages, when printk is called in interrupt context.
Currently on a serial console if printk is called with
ints disabled, it can hold interrupts off for up to 20
milliseconds.

My solution was to set up a worker thread to handle deferred
printk activity. I don't think this works for the oops case,
because you don't want to defer the output. However, I can
post this code if you think it would help with this problem.

I hesitate to just drop the call to wake_up_klogd() without
some kind of mechanism call it later. Waiting until the
next printk will work to drain the buffer, but could lead
to indefinite intervals with printks waiting to be logged.
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================

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