Re: [linux-audio-dev] Re: [announce] [patch] Voluntary KernelPreemption Patch

From: Lee Revell
Date: Tue Jul 13 2004 - 17:35:49 EST


On Tue, 2004-07-13 at 05:29, Andrew Morton wrote:
> Lee Revell <rlrevell@xxxxxxxxxxx> wrote:
> >
> > On Tue, 2004-07-13 at 05:00, Andrew Morton wrote:
> > > Lee Revell <rlrevell@xxxxxxxxxxx> wrote:
> > > >
> > > > > framebuffer scrolling inside lock_kernel(). Tricky. Suggest you use X or
> > > > > vgacon. You can try removing the lock_kernel() calls from do_tty_write(),
> > > > > but make sure you're wearing ear protection.
> > > > >
> > > >
> > > > OK, I figured this was not an easy one. I can just not do that.
> > >
> > > Why not? You can certainly try removing those [un]lock_kernel() calls.
> > >
> >
> > Maybe I missed something. What exactly do you mean by 'make sure you're
> > wearing ear protection'?
> >
>
> It might go boom. If it does screw up, it probably won't be very seriously
> bad - maybe some display glitches. Just an experiment.
> -
> 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/
>

Seems to work perfectly. No visible display glitches.

I would imagine that putting a modem on a tty, then stressing the system
and watching for line errors would be a definitive test.

--- drivers/char/tty_io.c.orig 2004-07-13 16:55:28.000000000 -0400
+++ drivers/char/tty_io.c 2004-07-13 16:55:51.000000000 -0400
@@ -684,17 +684,13 @@
return -ERESTARTSYS;
}
if ( test_bit(TTY_NO_WRITE_SPLIT, &tty->flags) ) {
- lock_kernel();
written = write(tty, file, buf, count);
- unlock_kernel();
} else {
for (;;) {
unsigned long size = max((unsigned long)PAGE_SIZE*2, 16384UL);
if (size > count)
size = count;
- lock_kernel();
ret = write(tty, file, buf, size);
- unlock_kernel();
if (ret <= 0)
break;
written += ret;

Lee

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