From: Samuel Thibault <samuel.thibault@gnu.org>
To: Sergey Bugaev <bugaevc@gmail.com>
Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org
Subject: Re: [PATCH 3/4] hurd: Microoptimize mmap ()
Date: Mon, 24 Apr 2023 23:25:52 +0200 [thread overview]
Message-ID: <20230424212552.yticdmmbgxknh2as@begin> (raw)
In-Reply-To: <CAN9u=HcHkt0pggx9ps-oQfvWXnegsrhoW9DQABP8yrPEp4ZFkQ@mail.gmail.com>
Sergey Bugaev, le mar. 25 avril 2023 00:09:58 +0300, a ecrit:
> 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.
Yes, that'd probably be great :)
> 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?).
It's probably that just nobody thought about adding it.
> I'm thinking it should probably go into misc/sys/cdefs.h as __COLD (or
> __attribute_cold?). Something like this:
>
> #if __glibc_has_attribute (cold)
> #define __COLD __attribute__ ((cold))
> #else
> #define __COLD
> #endif
>
> What do you think?
Yes! Though you can even make it
#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__cold__)
Samuel
next prev parent reply other threads:[~2023-04-24 21:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 21:55 [PATCH 1/4] hurd: Implement MAP_32BIT Sergey Bugaev
2023-04-23 21:55 ` [PATCH 2/4] hurd: Don't attempt to deallocate MACH_PORT_DEAD Sergey Bugaev
2023-04-24 20:44 ` Samuel Thibault
2023-04-23 21:55 ` [PATCH 3/4] hurd: Microoptimize mmap () Sergey Bugaev
2023-04-24 20:46 ` Samuel Thibault
2023-04-24 21:09 ` Sergey Bugaev
2023-04-24 21:25 ` Samuel Thibault [this message]
2023-04-23 21:55 ` [RFC PATCH 4/4] hurd: Implement prefer_map_32bit_exec tunable Sergey Bugaev
2023-04-24 20:48 ` Samuel Thibault
2023-04-24 20:42 ` [PATCH 1/4] hurd: Implement MAP_32BIT Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230424212552.yticdmmbgxknh2as@begin \
--to=samuel.thibault@gnu.org \
--cc=bug-hurd@gnu.org \
--cc=bugaevc@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).