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=0.1 required=5.0 tests=BAYES_00, DNS_FROM_AHBL_RHSBL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=BgQkK73fUMIf0JjQoXxCZLU+VZzwC0v2xWLiG8SUMvA=; b=XbhBXxZp+Hylu6idH8NNSzwBxYgDlhjDZZaPOHazrrA26FuEA7F4OKE4/Zs78jdzkV U5xkWg6YirJaYk6K3CeDOYhkkq1JWMXO6gk1NW/b++C2pSV80+Tvc5EA0xNXMUy6QhhR iGEQlyzNPJMMYc2SRAVekvj0KFOy1sTwz70t9Ap+n4IbL+wEO5JIQReUhnT5UpfcfV4o t08m2H1vcUee7oCwS/hSm0RtiBDkqCqh7u9d+1TuZbbGjYfV5dYtYd9lM8xtoim56EQ2 rv/e6+muQrPHgEKn2xZxkXo9j4lyvWX3kqc/cGcGAq7+Kb8sSTbgNuIoWuI9/65q1eYN 2azA== X-Gm-Message-State: ALoCoQkLMivoIotRmxIRKoJDD+Cx7nFpxZ+LLoUlibBJSSiC+uDPzh090qP/Kxac5Xk7+MIUYTzJ X-Received: by 10.229.27.73 with SMTP id h9mr9571633qcc.3.1421980215209; Thu, 22 Jan 2015 18:30:15 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20150123021329.GF2702@gardel-login> References: <20150123021329.GF2702@gardel-login> From: Andy Lutomirski Date: Thu, 22 Jan 2015 18:29:55 -0800 Message-ID: To: Lennart Poettering , kbd@lists.altlinux.org Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Fri, 23 Jan 2015 09:51:15 +0300 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: Fri, 23 Jan 2015 02:30:20 -0000 Archived-At: List-Archive: 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? Thanks, Andy