Received: by 10.192.165.148 with SMTP id m20csp3656391imm; Mon, 23 Apr 2018 10:04:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx48fRgSkXOuS1eBgbJWp/WwH2IuSdgHxYjlV4sQfxWrp4Xl9zuNUewRWN/hfdUdqtg1T4MEE X-Received: by 2002:a17:902:7611:: with SMTP id k17-v6mr21614956pll.244.1524503064026; Mon, 23 Apr 2018 10:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524503063; cv=none; d=google.com; s=arc-20160816; b=FBreJUSMvBCLn6jCZgcktjtzAOksfI+o5Rc4gPjvhI1B1I2DUQYN+y47VfeFO9p/fQ t+J4upIjgWKXtVbYrith/2SkdudJbr+TGl2t1mnTEAYy5el9L2jaVauhQ0+lG6RJamJc XLtzyuO0xqweT9iDz/ydzVHOEpS7wX63bq1ueRqMQycURnZxegOMkZnQcYfuyILtUC+H ZjMs1xJYV5OeT10/Ao1+ItlHpq7jlLFYZ82mulqwUqvdsb3J1vIRWkG/vDsvD1aMK1q+ VQWh54KfhLjJtr3cBkPEzjjdSsxXTOsXIAZrOmVwZr6yTLqCmUKQjV5aiPdjlMWxc005 6LCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=l5c/Abg5fyYc2QEiP1Oh/VGBVhsFTkxbVrljK/16Eac=; b=kHmRRDTiRsvOLkszm8Npa0bZ6xvH+u8WOtgUhIK2ry4ikgo/nbD/EhUcjPrR7RPaMs 6uezyemUmT5F3a915OBLVx+1YTgN0fyGWmUqYi7owNMdvZex3s58SfIoxn+ow5aT+doU 2CZlm6loOnSvGKWx+x7A0J5ew/OJTmtYN2R3qWrVlKroQkv+OSPZh3lBb4QuwxJDtnMD nXBhPZBlAs+DAL1h4Z5r8L6wUsF7G9MYTbgaqez/X8GTubjUPFEOzCvC3uFwpsuVD2CX ViSnh2hVtAtYYx5B6rlfa0ECMTf/Z+q81HG92GHI+32NsJsvhrx9xGg8QLe/cUWGnT06 h48A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k127si10084942pgc.578.2018.04.23.10.04.08; Mon, 23 Apr 2018 10:04:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932142AbeDWRCe (ORCPT + 99 others); Mon, 23 Apr 2018 13:02:34 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:46992 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932068AbeDWRCd (ORCPT ); Mon, 23 Apr 2018 13:02:33 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B897E8046A; Mon, 23 Apr 2018 19:02:30 +0200 (CEST) Date: Mon, 23 Apr 2018 19:02:30 +0200 From: Pavel Machek To: Paul Menzel Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Ingo Molnar Subject: Re: How to disable Linux =?utf-8?Q?kernel_?= =?utf-8?Q?self-extraction_=28KERNEL=5FGZIP=2C_KERNEL=5FBZIP2=2C_=E2=80=A6?= =?utf-8?B?KT8=?= Message-ID: <20180423170230.GA22412@amd> References: <9468be0e-5eb9-246c-e60e-3d8019a42fd1@molgen.mpg.de> <20180422102033.GB26243@amd> <20180422205208.GA8672@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <20180422205208.GA8672@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > >>I try to decrease boot time, and my system has an SSD and enough spac= e, so > > >>loading 18 instead of 12 MB doesn=E2=80=99t make a difference, but the > > >>self-extraction is noticeable. So, I like to disable it. > > > > > >How long does GZIP extraction take on your hardware? > >=20 > > It=E2=80=99s hard to measure =E2=80=93 at least I didn=E2=80=99t find a= way to do so =E2=80=93, but counting > > from the last GRUB message to the first message of Linux (with `quiet` > > removed from the the command line), it takes roughly *two* seconds. > >=20 > > ``` > > $ ls -l /boot/vmlinuz-4.15.0-3-686-pae > > -rw-r--r-- 1 root root 3987200 Apr 19 12:13 /boot/vmlinuz-4.15.0-3-686= -pae > > $ ls -lh /boot/vmlinuz-4.15.0-3-686-pae > > -rw-r--r-- 1 root root 3,9M Apr 19 12:13 /boot/vmlinuz-4.15.0-3-686-pae > > $ time scripts/extract-vmlinux vmlinuz-4.15.0-3-686-pae > bla.txt > >=20 > > real 0m1,204s > > user 0m1,041s > > sys 0m0,245s > > ``` >=20 > Interesting; looks like I have faster machine (thinkpad X220). >=20 > pavel@duo:/data/l/linux$ time scripts/extract-vmlinux /tmp/vmlinux.bin > > /tmp/delme > 0.21user 0.15system 0.66 (0m0.660s) elapsed 56.36%CPU > pavel@duo:/data/l/linux$ ls -al /tmp/delme > -rw-r--r-- 1 pavel pavel 18275356 Apr 22 22:44 /tmp/delme > pavel@duo:/data/l/linux$ gzip /tmp/delme > pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz > 0.21user 0.02system 0.23 (0m0.232s) elapsed 100.03%CPU > pavel@duo:/data/l/linux$ gzip -1 /tmp/delme > pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz > 0.22user 0.03system 0.25 (0m0.257s) elapsed 100.11%CPU > pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz >=20 > ..and it also looks like extract-kernel is significantly slower than > gzip -9, because it is not using all the CPU. Strange. >=20 > Interesting. I somehow assumed gzip -d would be faster than that on > modern machines. >=20 > So yes, looks like uncompressed kernel image may be good idea. Actually... Compressors usually have a mode when they store the data uncompressed. So you should be able to prepare .gz image which is not really compressed inside, and thus really fast to uncompress. Or maybe even better -- there should be some compression algorithms that are fast enough to uncompress that there should be no slowdown. Maybe use one of those? Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlreEaYACgkQMOfwapXb+vJuGgCgivTLoIa19tIEQbDUyfD5bl1V WEMAn3f3UU9jeKV+flxUZ+MfB9J/vLaO =He0a -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--