Linux console tools development discussion
 help / color / mirror / Atom feed
From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: Linux console tools development discussion
	<kbd@lists.altlinux.org>,
	 Lennart Poettering <lennart@poettering.net>
Cc: systemd Mailing List <systemd-devel@lists.freedesktop.org>
Subject: Re: [kbd] [systemd-devel] systemd-vconsole-setup fails very slowly
Date: Mon, 26 Jan 2015 13:39:58 +0300
Message-ID: <54C6197E.2030003@gmail.com> (raw)
In-Reply-To: <CALCETrXw3THgwcGUJxp8UFAAFshSDxvD22jWoBQs9gmRkJkp_Q@mail.gmail.com>

23.01.2015 05:29, Andy Lutomirski пишет:
> On Thu, Jan 22, 2015 at 6:13 PM, Lennart Poettering
> <lennart@poettering.net> wrote:
>> On Wed, 21.01.15 19:15, Andy Lutomirski (luto@amacapital.net) wrote:
>>
>>> Hi all-
>>>
>>> When running virtme (a simple vm gadget) on Fedora 21, the slowest
>>> part of bootup by far appears to be systemd-vconsole-setup:
>>>
>>> # time /usr/lib/systemd/systemd-vconsole-setup
>>> putfont: PIO_FONT trying ...
>>> ...................
>>> setfont: putfont: 512,8x16:  failed: -1
>>> putfont: PIO_FONT: Invalid argument
>>> /usr/bin/setfont failed with error code 71.
>>
>> setfont is not part of systemd, we just invoke it. If that fails, this
>> is a problem somewhere between the VM, the kernel and console-tools.
>>
> 
> Aha -- I missed that systemd-vconsole-setup calls setfont.  I can
> trigger the same problem by just typing setfont.  For whatever reason,
> my other Fedora 21 computer only has this problem if I type setfont
> and not if I run systemd-vconcole-setup.
> 
>> My uneducated guess is that your virtual machine boots up with a
>> non-graphical console, and the tool thus tries to upload the fonts
>> into the good old VGA hw text mode glyph tables, and qemu is very slow
>> at that... Or something like that.
> 
> setfont is doing this:
> 
> nanosleep({0, 250000000}, NULL)         = 0
> ioctl(3, PIO_FONT, 0xfbc010)            = -1 EINVAL (Invalid argument)
> write(2, ".", 1.)                        = 1
> nanosleep({0, 250000000}, NULL)         = 0
> ioctl(3, PIO_FONT, 0xfbc010)            = -1 EINVAL (Invalid argument)
> write(2, ".", 1.)                        = 1
> nanosleep({0, 250000000}, NULL)         = 0
> ioctl(3, PIO_FONT, 0xfbc010)            = -1 EINVAL (Invalid argument)
> write(2, ".", 1.)                        = 1
> nanosleep({0, 250000000}, NULL)         = 0
> ioctl(3, PIO_FONT, 0xfbc010)            = -1 EINVAL (Invalid argument)
> write(2, ".", 1.)                        = 1
> nanosleep({0, 250000000}, NULL)         = 0
> ioctl(3, PIO_FONT, 0xfbc010)            = -1 EINVAL (Invalid argument)
> write(2, ".", 1.)                        = 1
> 
> This thing has only a serial console:
> 
> # cat /proc/consoles
> ttyS0                -W- (EC   a)    4:64
> 
> setfont does this:
> 
>         /* we allow ourselves to hang here for ca 5 seconds, xdm may
> be playing tricks on us. */
>         while ((loop++ < 20) && (i = ioctl(fd, PIO_FONT, buf)))
>           {
>             if (loop <= 1)
>               fprintf(stderr, "putfont: PIO_FONT trying ...\n");
>             else
>               fprintf(stderr, ".");
>             usleep(250000);
>           }
>         fprintf(stderr, "\n");
> 
> Alexey, would it make sense to remove this loop or to add a way to turn it off?

Sure. I'll add way to turn it off.

By the way, I planning to rewrite the setfont in library. Just like a
loadkeys has been rewritten in to library.

-- 
Rgrds, legion



  reply	other threads:[~2015-01-26 10:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23  2:29   ` Andy Lutomirski
2015-01-26 10:39     ` Alexey Gladkov [this message]
2015-04-01 18:56     ` Andy Lutomirski
2015-04-01 19:32       ` Kay Sievers
2015-04-01 19:36         ` Andy Lutomirski
2015-04-01 19:55           ` Kay Sievers
2015-04-01 20:45             ` Andy Lutomirski
2015-04-01 20:53               ` Kay Sievers
2015-04-01 21:19                 ` Andy Lutomirski
2015-04-01 21:36                   ` Kay Sievers
2015-04-01 21:38                     ` Andy Lutomirski
2015-04-01 21:47                       ` Kay Sievers
2015-04-01 22:00                         ` Andy Lutomirski
2015-04-01 22:28                           ` Kay Sievers
2015-04-01 21:20       ` Alexey Gladkov
2015-04-06 21:48     ` Alexey Gladkov
2015-04-06 22:55       ` Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C6197E.2030003@gmail.com \
    --to=gladkov.alexey@gmail.com \
    --cc=kbd@lists.altlinux.org \
    --cc=lennart@poettering.net \
    --cc=systemd-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux console tools development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \
		kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com
	public-inbox-index kbd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.kbd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git