Re: [RFC] non-refcounted pages, application to slab?
From: Nick Piggin <hidden>
Date: 2006-01-25 09:56:44
Also in:
lkml
On Wed, Jan 25, 2006 at 10:54:08AM +0100, Eric Dumazet wrote:
Nick Piggin a ecrit :quoted
@@ -2604,10 +2604,10 @@ static inline void *__cache_alloc(kmem_clocal_irq_save(save_flags); objp = ____cache_alloc(cachep, flags); + prefetchw(objp); local_irq_restore(save_flags); objp = cache_alloc_debugcheck_after(cachep, flags, objp, __builtin_return_address(0)); - prefetchw(objp); return objp; }I'm not sure why you moved this prefetchw(obj) : This is not related to your 'non-refcounting' part, is it ?
Stray hunk. Thanks. Nick
When I added this prefetchw in slab code, I did place it *after* the local_irq_restore(save_flags); because I was not sure if the serialization/barrier (popf) would force the cpu (x86/x86_64 in mind) to either : - finish all the loads (even if they are speculative/hints) (so giving a bad latency) - cancel the speculative loads (so prefetchw() *before* the local_irq_restore() would be useless.
Makes sense. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>