* Pavel Machek ([email protected]) wrote:
> Hi!
>
> > > > It seems draconian to drain the entire buffer with ints disabled.
> > > > Is it possible to break this up and send out smaller chunks
> > > > at a time? Maybe by putting a chunk loop in release_console_sem()?
> > >
> > > Well, I believe someone got
> > >
> > > DDetetccctted ed 113223 HHzz CPUCPU
> > >
> > > in his dmesg, and now we have this 'draconian' locking. How can we
> > > prevent mangled messages without it?
> >
> > The main interest seems to be to protect from mixed printk output
> > between different CPUs in process context. I don't think it would be
> > that bad if interrupts come and output error messages in the middle of a
> > printk, isn't it ?
> >
> > therefore, could we do something like :
> >
> >
> > if (!in_irq())
> > spin_lock(&logbuf_lock);
> > ...
> > if (!in_irq())
> > spin_unlock(&logbuf_lock);
> >
> > ? (yes, this is a crazy idea)
>
> Two messages in atomic sections on different cpus could still be mixed
> :-). But yes, something like this may be the way to go.
Not in "preempt disable" sections though. Only in interrupt handlers.
But yes, I assume here that messages coming from interrupt handlers can
afford being interleaved.
Mathieu
> Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]