Re: [PATCH 0/8] ARC updates to uClibc

Bernhard Reutner-Fischer <[email protected]>
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
On February 16, 2015 6:15:15 AM GMT+01:00, Vineet Gupta <[email protected]> wrote:
>On Saturday 14 February 2015 07:41 PM, Bernhard Reutner-Fischer wrote:
>
>>Please consider merging the cumulative ARC updates to uClibc.
>>The important one being support for variable page size and
>>optimization of sigaction code path.
>
>
>Can you please elaborate on 6 and 8?
>LGTM otherwise.
>Thanks,
>
>
>When we ran LMBench under perf, lat_sig install showed hot spots in
>userspace memcpy and memset.
>Turns out that those were for small sized buffers, leading to greater
>micro-architectural penalty for ARC and more importantly the user of
>those functions in this case seemed extraneous anyways:
>
>* lat_sig -> sigemtpyset -> memset for 8 bytes was pointless, given
>_SIGSET_NWORDS is 2 for most arches
>* lat_sig -> arc-specific-sigaction -> memcpy for 20 bytes was also not
>fully justified given ARC code clobbers a few fields right after the
>memcpy.
>
>so 8/8 removed the out-of-line memset from sigemptyset, making it
>fallback to inline variant in bits/sigset.h - similar to what
>sigfillset already does.

Fair enough.

>
>While it at I also did some arch specific adjustment in sigaction path
>- inlining the rt_sigaction syscall stub detour to reduce branch return
>stack mispredicts etc - which is what 6/8 does !

This sounds suspicious.
IIRC we already had that argument, last time around _dl_do_reloc and _dl_do_lazy_reloc.
Could it be that your port has a bug here ( missed optimisation ) around ifunc handling? Sounds like back then on ARM https://gcc.gnu.org/PR40887#c6

What am I missing?

Thanks,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.