2001-11-09 09:25:56

by root

[permalink] [raw]
Subject: serial console slow


Hi!

> I tried to boot my kernel using the serial console, using the
> console=ttyS0,115200 (it does the same thing with 9600) ... it work great
> until :
>
> Freeing unused kernel memory: 36k freed
> serial console detected. Disabling virtual terminals.
> console=/dev/ttyS0
>
> At this point the output of the serial line slow down dramaticly ... almost
> to a halt ... I get 1 line every 30 seconds !!!
>
> why is this slow down occuring ? the part which is 100% kernel is going fast
> and ok, but when it become console related ... it slows down ?

Serial just got its control signals (it is now *userland* writing, and
userland honours them), plus userland is probably opening/closing
serial all the time. Bad.
Pavel

--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.




----- End forwarded message -----

--
--
I'm really [email protected]. Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel ;-).


2001-11-09 19:17:10

by H. Peter Anvin

[permalink] [raw]
Subject: Re: serial console slow

Followup to: <[email protected]>
By author: root <[email protected]>
In newsgroup: linux.dev.kernel
>
> Hi!
>
> > I tried to boot my kernel using the serial console, using the
> > console=ttyS0,115200 (it does the same thing with 9600) ... it work great
> > until :
> >
> > Freeing unused kernel memory: 36k freed
> > serial console detected. Disabling virtual terminals.
> > console=/dev/ttyS0
> >
> > At this point the output of the serial line slow down dramaticly ... almost
> > to a halt ... I get 1 line every 30 seconds !!!
> >
> > why is this slow down occuring ? the part which is 100% kernel is going fast
> > and ok, but when it become console related ... it slows down ?
>
> Serial just got its control signals (it is now *userland* writing, and
> userland honours them), plus userland is probably opening/closing
> serial all the time. Bad.
> Pavel

I have had much better luck talking to /dev/console in userland.
IMNSHO this should *always* work; anything else is broken.
/dev/console currently *IS* broken to some degree, multi-console
hasn't worked properly for a long time, and you don't get job control
running of it because it isn't a tty, but I think it's a lot less
broken than things like the above...

(And dammit, I really would like to see console=tty0 console=ttyS0 to
actually give me both consoles -- in userland *and* in the kernel...)

-hpa
--
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <[email protected]>

2001-11-09 19:25:59

by Miquel van Smoorenburg

[permalink] [raw]
Subject: Re: serial console slow

In article <[email protected]>,
H. Peter Anvin <[email protected]> wrote:
>I have had much better luck talking to /dev/console in userland.
>IMNSHO this should *always* work; anything else is broken.
>/dev/console currently *IS* broken to some degree, multi-console
>hasn't worked properly for a long time, and you don't get job control
>running of it because it isn't a tty, but I think it's a lot less
>broken than things like the above...

You don't have job control on /dev/console because it will never
become a controlling tty automatically. But if you make it your
controlling tty with the right ioctl() you'll have job control.

In fact the latest sysvinit does this for process spawned from
the 'sysinit', 'bootwait' and 'wait' type lines in /etc/inittab
and that works fine.

>(And dammit, I really would like to see console=tty0 console=ttyS0 to
>actually give me both consoles -- in userland *and* in the kernel...)

That would be extremely c00l ;)

Mike.
--
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former" -- Albert Einstein.