Re: [PATCH] proc: faster /proc/*/status
From: Andi Kleen
Date: Sun Aug 07 2016 - 12:59:56 EST
> And then what? Parsing format string is still be there.
Perhaps could have a fast path for simple cases.
>
> This is first line of profile of the first function (format_decode)
>
> â static noinline_for_stack
> â int format_decode(const char *fmt, struct printf_spec *spec)
> â {
> 10.38 â push %rbp <===
> 1.07 â mov %rsp,%rbp
> 1.09 â push %r12
> 4.51 â mov %rsi,%r12
> 1.40 â push %rbx
> 1.86 â mov %rdi,%rbx
> â sub $0x8,%rsp
>
> It is so bloated that gcc needs to be asked to not screw up with stack
> size.
What happens when you drop all the noinlines for this? I assume
this would alread make it faster. And now that we have bigger
stacks we can likely tolerate it.
-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.