[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] hurd: Microoptimize mmap ()

From: Sergey Bugaev
Subject: Re: [PATCH 3/4] hurd: Microoptimize mmap ()
Date: Tue, 25 Apr 2023 00:09:58 +0300

On Mon, Apr 24, 2023 at 11:47 PM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> Is it really worth making the code a bit obscure?

No, not really.

What happened here was I looked at what my mask computation compiled
to, to verify it does the right thing on both x86_64 and i686, and
then I saw how the error branches are compiled, and next thing you
know there are new __glibc_unlikely's in my tree :)

What I should rather look into is marking __hurd_fail and friends with
__attribute__((cold)); that would take care of all the error branches
everywhere automatically without having to mark things up. But I did a
quick grep and found nothing using __attribute__((cold)) yet, so I
don't know what the right way of using it would be (and maybe it's not
being used intentionally?). I'm thinking it should probably go into
misc/sys/cdefs.h as __COLD (or __attribute_cold?). Something like

#if __glibc_has_attribute (cold)
#define __COLD __attribute__ ((cold))
#define __COLD

What do you think?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]