lkml.org 
[lkml]   [2008]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: mm: slab - __cache_alloc NULL prefetch fix
From
Date
On Thu, 20 Nov 2008 19:44:00 +0300, Cyrill Gorcunov said:

> - prefetchw(objp);
>
> - if (likely(objp))
> + if (likely(objp)) {
> + prefetchw(objp);
> kmemcheck_slab_alloc(cachep, flags, objp, obj_size(cachep));
> + }

Although it probably makes sense to not bother prefetching NULL, I also
need to wonder how useful it is to prefetch something that we then
turn around and dereference in the very next line of code.

Maybe we should just lose the prefetch entirely?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-11-20 21:01    [W:0.093 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site