* [merged] lib-uninline-simple_strtoull.patch removed from -mm tree
@ 2021-07-06 19:22 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-06 19:22 UTC (permalink / raw)
To: adobriyan, mm-commits
The patch titled
Subject: lib: uninline simple_strtoull()
has been removed from the -mm tree. Its filename was
lib-uninline-simple_strtoull.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Alexey Dobriyan <adobriyan@gmail.com>
Subject: lib: uninline simple_strtoull()
Gcc inlines simple_strtoull() too agressively.
Given that all 4 signatures match, everything very efficiently calls or
tailcalls into simple_strtoull():
ffffffff81da0240 <simple_strtoll>:
ffffffff81da0240: 80 3f 2d cmp BYTE PTR [rdi],0x2d
ffffffff81da0243: 74 05 je ffffffff81da024a <simple_strtoll+0xa>
ffffffff81da0245: e9 76 ff ff ff jmp simple_strtoull
ffffffff81da024a: 48 83 c7 01 add rdi,0x1
ffffffff81da024e: e8 6d ff ff ff call simple_strtoull
ffffffff81da0253: 48 f7 d8 neg rax
ffffffff81da0256: c3 ret
Space savings (on F34-ish .config)
add/remove: 0/0 grow/shrink: 1/3 up/down: 52/-313 (-261)
Function old new delta
vsscanf 2167 2219 +52
simple_strtoul 72 2 -70
simple_strtoll 143 23 -120
simple_strtol 143 20 -123
Link: https://lkml.kernel.org/r/YMO2zoOQk2eF34tn@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/vsprintf.c | 1 +
1 file changed, 1 insertion(+)
--- a/lib/vsprintf.c~lib-uninline-simple_strtoull
+++ a/lib/vsprintf.c
@@ -61,6 +61,7 @@
*
* This function has caveats. Please use kstrtoull instead.
*/
+noinline
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
{
unsigned long long result;
_
Patches currently in -mm which might be from adobriyan@gmail.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-06 19:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 19:22 [merged] lib-uninline-simple_strtoull.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.