Messages in this thread | | | Date | Mon, 23 Feb 2009 10:43:20 -0500 (EST) | From | Christoph Lameter <> | Subject | Re: [PATCH 04/20] Convert gfp_zone() to use a table of precalculated value |
| |
On Tue, 24 Feb 2009, Nick Piggin wrote:
> > Are you sure that this is a benefit? Jumps are forward and pretty short > > and the compiler is optimizing a branch away in the current code. > > Pretty easy to mispredict there, though, especially as you can tend > to get allocations interleaved between kernel and movable (or simply > if the branch predictor is cold there are a lot of branches on x86-64). > > I would be interested to know if there is a measured improvement. It > adds an extra dcache line to the footprint, but OTOH the instructions > you quote is more than one icache line, and presumably Mel's code will > be a lot shorter.
Maybe we can come up with a version of gfp_zone that has no branches and no lookup?
| |