lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Aug 2019 18:25:07 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Denis Efremov <efremov@...ras.ru>
Cc:     Akinobu Mita <akinobu.mita@...il.com>, Jan Kara <jack@...e.cz>,
        Matthew Wilcox <matthew@....cx>, linux-kernel@...r.kernel.org,
        dm-devel@...hat.com, linux-fsdevel@...r.kernel.org,
        linux-media@...r.kernel.org, Erdem Tumurov <erdemus@...il.com>,
        Vladimir Shelekhov <vshel@....nsk.su>
Subject: Re: [PATCH] lib/memweight.c: optimize by inlining bitmap_weight()

On Wed, 21 Aug 2019 10:42:00 +0300 Denis Efremov <efremov@...ras.ru> wrote:

> This patch inlines bitmap_weight() call.

It is better to say the patch "open codes" the bitmap_weight() call.

> Thus, removing the BUG_ON,

Why is that OK to do?

I expect all the code size improvements are from doing this?

> and 'longs to bits -> bits to longs' conversion by directly calling
> hweight_long().
> 
> ./scripts/bloat-o-meter lib/memweight.o.old lib/memweight.o.new
> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
> Function                                     old     new   delta
> memweight                                    162     152     -10
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ