Conversation

I’ve once again compiled my server and workstation with the branch profilers enabled. You can see the data for my server here

The branch_annotated file is where “likely”() and “unlikely()” are correct or not.

The branch_all is if the if statement was true or false.

The data is updated nightly on a live machine. I’ll run his for a couple of weeks to see where the Linux kernel gets it wrong.

The currently running version is v6.18.2.

1
4
9

@rostedt One of the most frequent wrong predictions is in line 84 of err.h. That shows

return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);

Is the point then that

return IS_ERR_VALUE((unsignedl long)ptr) || unlikely(!ptr);

would be better? I wonder if modern processors don't evaluate both sides of || in parallel anyway.

0
0
0