Re: real time hang w/ latency tracing

Ingo Molnar
2007-04-04T15:44:30Z

* Daniel Walker <dwalker@mvista.com> wrote:

> > > struct uart_port {
> > > +#ifdef CONFIG_LATENCY_TIMING
> > > + raw_spinlock_t lock; /* port lock */
> > > +#else
> > > spinlock_t lock; /* port lock */
> > > +#endif
> >
> > ugh - this will only cause other problems if anyone else is trying
> > to use the serial code. This needs a cleaner fix - such as not doing
> > that printk from atomic context.
>
> I assumed this fix wasn't totally right .. Interrupts could be enabled
> just before printing , after any critical stuff has happened then
> disabled again after printing .. Or are you thinking of something more
> complex?

i mean non-printk related breakages to the normal serial driver - which
is now surprised by this raw lock in an -rt kernel.

this is a hard issue and there's no easy solution i can see. neither
having it as a raw lock is a good solution, nor having it as a
preemptible lock is a good solution.

Ingo