Re: [PATCH] oops_in_progress is unlikely()
From: Jamie Lokier (jamie_at_shareable.org)
Date: 09/10/03
- Previous message: Wouter Vlothuizen: "Re: NFS client problems in 2.4.18 to 2.4.20"
- In reply to: Richard B. Johnson: "Re: [PATCH] oops_in_progress is unlikely()"
- Next in thread: Richard B. Johnson: "Re: [PATCH] oops_in_progress is unlikely()"
- Reply: Richard B. Johnson: "Re: [PATCH] oops_in_progress is unlikely()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 10 Sep 2003 19:31:38 +0100 To: "Richard B. Johnson" <root@chaos.analogic.com>
Richard B. Johnson wrote:
> I would guess that the compiler output might be:
Your guess is incorrect.
> You are always going to take an extra jump in one execution
> path after the function, and you will take a conditional jump
> before the function call in the other execution path. So, you
> always have the "extra" jumps, no matter.
That is not true. The "likely" path has no taken jumps.
Think about the code again.
How would you optimise it, if you were writing assembly language yourself?
(In more complex examples, another factor is that mis-predicted
conditional jumps are much slower than unconditional jumps, so it is
good to favour the latter in the likely path).
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Wouter Vlothuizen: "Re: NFS client problems in 2.4.18 to 2.4.20"
- In reply to: Richard B. Johnson: "Re: [PATCH] oops_in_progress is unlikely()"
- Next in thread: Richard B. Johnson: "Re: [PATCH] oops_in_progress is unlikely()"
- Reply: Richard B. Johnson: "Re: [PATCH] oops_in_progress is unlikely()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]