lkml.org 
[lkml]   [2006]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] non-refcounted pages, application to slab?
On Wed, Jan 25, 2006 at 10:54:08AM +0100, Eric Dumazet wrote:
> Nick Piggin a écrit :
>
> >@@ -2604,10 +2604,10 @@ static inline void *__cache_alloc(kmem_c
> >
> > local_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 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/

\
 
 \ /
  Last update: 2006-01-25 10:59    [W:0.042 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site