Re: [PATCH] mm/slab.c : prefetchw the start of new allocated objects

From: Ingo Molnar
Date: Fri Jul 29 2005 - 05:16:58 EST



* Eric Dumazet <dada1@xxxxxxxxxxxxx> wrote:

> local_irq_restore(save_flags);
> objp = cache_alloc_debugcheck_after(cachep, flags, objp, __builtin_return_address(0));
> + prefetchw(objp);
> return objp;

the idea is good, but i'd suggest to do the prefetchw a bit earlier,
right where we calculate objp. Furthermore, it might make sense to only
trigger the prefetchw in the alloc-miss (non-per-CPU cache) case. There
it's almost surely a win, in the per-CPU cache case it's not always.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/