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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAK-9PRAPTW61MWxjcwdfSWNoXhDRTgzN4WS7EM5Sr00bU8TbyQ@mail.gmail.com>
Date:	Tue, 27 Dec 2011 17:06:37 +0530
From:	Chinmay V S <cvs268@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Optimise apply_slack() for faster execution

The patch reduces code complexity by:
- Eliminating the need for intermediate expires_limit and mask variables.
- Simplifying the timer-coalescing logic of discarding lesser significant bits.

This leads to smaller mod_timer() and add_timer() subroutines in which
apply_slack() is inlined. For example, on a typical x86-build, the
patch reduces the size of mod_timer() by 16 instructions.The total
mod_timer() function is 173 instructions i.e. the patch makes the
function 9% smaller. A typical ARM-build also shows similar savings.

original masking-logic:
shl    %cl,%edx
sub    $0x1,%edx
mov    %edx,-0x10(%ebp)
not    %edx
and    %esi,%edx
mov    %edx,-0x14(%ebp)

patched bitwise logic:
shrl   %cl,-0x14(%ebp)
shll   %cl,-0x14(%ebp)

Enabling function-traces shows us that the mod_timer() and add_timer()
functions are called ~1300 times every minute. Hence optimising these
functions gives us some significant improvement.

regards
ChinmayVS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ