lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/5] refcount: Improve out-of-line code-gen
On Wed, Dec 08, 2021 at 07:36:58PM +0100, Peter Zijlstra wrote:
> Allow a number of ops to tail-call refcount_warn_saturate() in order
> to generate smaller out-of-line code.
>
> text data bss dec hex filename
> 97341 4985 1116 103442 19412 defconfig-build/kernel/events/core.o
> 97299 4985 1116 103400 193e8 defconfig-build/kernel/events/core.o
>

This patch also makes GCC do worse code-gen on the fast path, so I'll
drop it.

For some obscure raisin it causes this:

ring_buffer_put:
a950: f0 ff 0f lock decl (%rdi)
a953: 7c 20 jl a975 <ring_buffer_put+0x25>
a955: 74 01 je a958 <ring_buffer_put+0x8>
a957: c3 ret


ring_buffer_put:
a940: 53 push %rbx
a941: 48 89 fb mov %rdi,%rbx
a944: f0 ff 0f lock decl (%rdi)
a947: 7c 04 jl a94d <ring_buffer_put+0xd>
a949: 74 10 je a95b <ring_buffer_put+0x1b>
a94b: 5b pop %rbx
a94c: c3 ret

Which is just unacceptible...

\
 
 \ /
  Last update: 2021-12-09 09:34    [W:0.095 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site