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

2023-04-24 Thread Samuel Thibault
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

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

2023-04-24 Thread Sergey Bugaev
On Mon, Apr 24, 2023 at 11:47 PM Samuel Thibault 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 ar

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

2023-04-24 Thread Samuel Thibault
Hello, Is it really worth making the code a bit obscure? The mapping RPC will be way more expensive than branch misprediction... Samuel Sergey Bugaev, le lun. 24 avril 2023 00:55:25 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > sysdeps/mach/hurd/mmap.c | 8 +--- > 1 file changed,

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

2023-04-23 Thread Sergey Bugaev
Signed-off-by: Sergey Bugaev --- sysdeps/mach/hurd/mmap.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index 790eb238..d570be24 100644 --- a/sysdeps/mach/hurd/mmap.c +++ b/sysdeps/mach/hurd/mmap.c @@ -42,7 +42,8 @@