[PATCH] Add Safe-Linking to fastbins and tcache
Carlos O'Donell
carlos@redhat.com
Fri Mar 20 02:49:14 GMT 2020
On 3/19/20 8:10 PM, Wilco Dijkstra wrote:
> Hi Eyal,
>
>> I went over the patch and fixed it to conform to the coding standards.
>> I'm also added it as an attachment, hoping that this way lines won't
>> break during the transmission of the email.
>
> Thanks, it now applied fine. There are still a few long lines over 80 chars:
>
> + if (__glibc_unlikely (!aligned_OK (p)))
> + malloc_printerr ("do_check_malloc_state(): un-aligned fastbin chunk detected");
>
> There is a build issue in that PAGE_SHIFT is not defined. I'm not sure whether
> this should come from a Linux header, but it only seems to be set by a few
> targets with no generic default defined.
>
>> Regarding the benchmarks, I've just ran them on a simple GCP instance
>> (1 vCPU) before and after the patch. As you can see below, the change
>> isn't measurable in the "malloc-simple" tests. Sometimes the vanilla
>> version is faster (as it should be), but sometimes the patched version
>> is faster, which usually means that the change is lower than the noise
>> level on the testing server.
>
> Yes, ideally you need an unshared machine with turbo turned off if.
> I tried it on a Neoverse N1 and the results look pretty much identical.
> The perf profile shows it doesn't affect the hottest paths and only adds a
> few extra instructions. So from a performance viewpoint it looks good.
Thanks, that's good to know, and would have been an upfront blocker to
accepting the patches.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list