From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YQK7x-0003FR-9m for mharc-grub-devel@gnu.org; Tue, 24 Feb 2015 13:22:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQK7u-0003DE-Ff for grub-devel@gnu.org; Tue, 24 Feb 2015 13:22:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQK7m-0006Nx-Dk for grub-devel@gnu.org; Tue, 24 Feb 2015 13:22:31 -0500 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:34601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQK7m-0006Nh-0w for grub-devel@gnu.org; Tue, 24 Feb 2015 13:22:26 -0500 Received: by lbdu14 with SMTP id u14so26710065lbd.1 for ; Tue, 24 Feb 2015 10:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=J4yKOqBR69HnObNxhL2ByWkL9f1Gt2xsv9WkCAKvRuk=; b=hsZdZvmM0unet23AmvfM2tVYnBMi0lRpm5hXk+sBa/U7/01jO17hJLhXCQ5w/DsBy8 XTXevWqc7H1Ng8sy7ZKoC6gGbX/kGGUUBlLEfYmyMJceeKyH116DkZX16aPKeEmpMMRA rgEh74UF82RXWwZ3FT0Bm0DkK2vfJtnhA+ZXszzA+CMcwCN9Koa4SC/qGIruBVuDJMbr A4Ook3IxhlkKk00xWcJ7KEy6dpDFE7hCZOiDPfXP1lj79ZPqokQKA3CTEE4PYNWr71bO v2i3rp9rzYEUjSbkinAAmFWHWpi7sssoPmU52SyVY9mfoxytLZw3WaI7jeoZXlx16HdK MlMw== X-Received: by 10.112.51.114 with SMTP id j18mr15085416lbo.97.1424802145072; Tue, 24 Feb 2015 10:22:25 -0800 (PST) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id xl2sm5630218lbb.6.2015.02.24.10.22.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 10:22:23 -0800 (PST) Date: Tue, 24 Feb 2015 21:22:20 +0300 From: Andrei Borzenkov To: Michael Zimmermann Subject: Re: Image scaling performance Message-ID: <20150224212220.4163a5ba@opensuse.site> In-Reply-To: References: X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::229 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2015 18:22:35 -0000 =D0=92 Tue, 24 Feb 2015 19:01:03 +0100 Michael Zimmermann =D0=BF=D0=B8=D1=88=D0=B5=D1= =82: > what do u mean with "which is enabled on boot time."? > what do linux kernel and userspace applications use? >=20 Software implementation provided either by libgcc or explicitly defined like grub does it (e.g. see arch/arm/lib/lib1funcs.S in linux source tree). gcc generates call to them in both cases. > On Tue, Feb 24, 2015 at 1:39 PM, Vladimir 'phcoder' Serbinenko > wrote: > > > > > > Le Tue Feb 24 2015 at 12:48:10 PM, Michael Zimmermann > > a =C3=A9crit : > >> > >> thx I'll try that but wouldn't it make more sense to implement a hw > >> version of this function?(do I need a different compiler?) > >> > > AFAIK there isn't a consistent division instruction across all ARMs and > > which is enabled on boot time. > > You can implement hw version of division but it will crash on some mach= ines. > > Division is a slow operation on any platform and should be avoided as f= ar as > > possible. > >> > >> Almost all modules use this call and I guess it could really improve > >> the performance. > >> > >> On Tue, Feb 24, 2015 at 12:27 PM, Vladimir 'phcoder' Serbinenko > >> wrote: > >> > > >> > > >> > Le Tue Feb 24 2015 at 11:01:03 AM, Michael Zimmermann > >> > a =C3=A9crit : > >> >> > >> >> the function seems to use __aeabi_uidiv. I'm not sure if this is a = sw > >> >> or hw implementation. > >> > > >> > software. Try attached patch > >> >> > >> >> Full code: > >> >> ASM: http://pastebin.com/FnPRZt1H > >> >> pseudo-C: http://pastebin.com/dH3YBk46 > >> >> > >> >> On Tue, Feb 24, 2015 at 10:51 AM, Vladimir 'phcoder' Serbinenko > >> >> wrote: > >> >> > Did you try to look at ASM of the function in question? Do you > >> >> > compile > >> >> > to > >> >> > thumb? Multiplication sometimes generates function calls in thumb. > >> >> > Try > >> >> > marking the scaling function as arm explicitly > >> >> > > >> >> > Le 2015-02-24 10:39, "Michael Zimmermann" > >> >> > a > >> >> > =C3=A9crit > >> >> > : > >> >> >> > >> >> >> Any ideas what could slow down the image scaling algorithm? > >> >> >> The only reasons I could think of would either be slow memory or > >> >> >> some > >> >> >> compiler problems. Since my Ram is mapped cachable I don't think= the > >> >> >> RAM is too slow. > >> >> >> > >> >> >> I even forces using the Nearest neighbor algorithm already. It > >> >> >> speeds > >> >> >> things up a lot but it's not as fast as you'd expect. > >> >> >> > >> >> >> Some technical info: > >> >> >> ARMv7 > >> >> >> Linaro GCC 4.9 > >> >> >> MMU setup is done by the previous bootloader(I disabled GRUB's > >> >> >> (uboot) > >> >> >> MMU setup - it prooved to be faster) > >> >> >> > >> >> >> _______________________________________________ > >> >> >> Grub-devel mailing list > >> >> >> Grub-devel@gnu.org > >> >> >> https://lists.gnu.org/mailman/listinfo/grub-devel > >> >> > > >> >> > > >> >> > _______________________________________________ > >> >> > Grub-devel mailing list > >> >> > Grub-devel@gnu.org > >> >> > https://lists.gnu.org/mailman/listinfo/grub-devel > >> >> > > >> >> > >> >> _______________________________________________ > >> >> Grub-devel mailing list > >> >> Grub-devel@gnu.org > >> >> https://lists.gnu.org/mailman/listinfo/grub-devel > >> > > >> > > >> > _______________________________________________ > >> > Grub-devel mailing list > >> > Grub-devel@gnu.org > >> > https://lists.gnu.org/mailman/listinfo/grub-devel > >> > > >> > >> _______________________________________________ > >> Grub-devel mailing list > >> Grub-devel@gnu.org > >> https://lists.gnu.org/mailman/listinfo/grub-devel > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel