From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa.local.altlinux.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DNS_FROM_AHBL_RHSBL,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.0 Message-ID: <551C6113.2070108@gmail.com> Date: Thu, 02 Apr 2015 00:20:19 +0300 From: Alexey Gladkov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Linux console tools development discussion , Lennart Poettering References: <20150123021329.GF2702@gardel-login> In-Reply-To: OpenPGP: id=4CFFD434; url=http://pgp.mit.edu:11371/pks/lookup?op=vindex&fingerprint=on&search=0xA45ABA544CFFD434 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: systemd Mailing List Subject: Re: [kbd] [systemd-devel] systemd-vconsole-setup fails very slowly X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 21:20:25 -0000 Archived-At: List-Archive: 01.04.2015 21:56, Andy Lutomirski пишет: > On Thu, Jan 22, 2015 at 6:29 PM, Andy Lutomirski wrote: >> On Thu, Jan 22, 2015 at 6:13 PM, Lennart Poettering >> 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? > > Ping, everyone? I answered: http://lists.altlinux.org/pipermail/kbd/2015-January/000512.html once again: 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