lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Dec 2011 21:03:09 +0000
From:	James Courtier-Dutton <james.dutton@...il.com>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Sasha Levin <levinsasha928@...il.com>
Subject: Re: [patch 0/3] kvm tool: Serial emulation overhaul

On 12 December 2011 18:40, Pekka Enberg <penberg@...nel.org> wrote:
> -#define TIMER_INTERVAL_NS 1000000      /* 1 msec */
> +#define TIMER_INTERVAL_NS 10000000     /* 10 msec */
>
> serial console output slows down by the same 10x factor:
>
> real    0m24.631s
> user    0m0.007s
> sys     0m0.025s
>
> Lowering the interval too 100 usec speeds things up but unfortunately
> chokes the serial layer rather quickly:
>
>    8 root      RT   [    6.759222] serial8250: too much work for irq4
> 0     0    0    0 S  0.0  0.0   0:00.00 migration/1
>    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/1:0
>   10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/1
>   11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/0:1
>   12 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/1
>   13 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/2
>   14 root      20   0     0    0    0 S  0[    6.759222] serial8250:
> too much work for irq4
> .0  0.0   0:00.00 kworker/2:0
>   15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/2
>
> So i'm pretty sure it's some bug in hw/serial.c that's limiting
> character output by interrupts.
>
Surely the system should be limiting the character output.
If the baud rate is set to 9600, the simulation of the serial port
should be slow.
If the baud rate is set to 115200, the simulation of the serial port
should be faster.
On real hardware, IO ports (outb/inb) are much slower than PCI memory mapped IO.
I am not sure if perceived slowness of kvm is by design or by accident though.

Now, if we want the guest serial console port to actually be fast, we
should let it be set to a baud of 921000 bps.
You could then use the nagle algorithm to improve its performance when
working in a kvm guest.

I have an application where when I set the guest serial port to 9600,
I want it to be slow, and be as close to real 9600 baud as possible.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ