public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Valdis.Kletnieks@vt.edu
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
	Christoph Lameter <cl@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: mm: slab - __cache_alloc NULL prefetch fix
Date: Thu, 20 Nov 2008 22:03:37 +0200	[thread overview]
Message-ID: <4925C299.6070907@cs.helsinki.fi> (raw)
In-Reply-To: <28180.1227211108@turing-police.cc.vt.edu>

Valdis.Kletnieks@vt.edu wrote:
> 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.

Note that kmemcheck_slab_alloc() is going to be a no-op on anything but 
a special developer or tester debug config.

  reply	other threads:[~2008-11-20 20:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 16:44 mm: slab - __cache_alloc NULL prefetch fix Cyrill Gorcunov
2008-11-20 17:01 ` Cyrill Gorcunov
2008-11-20 18:16   ` Christoph Lameter
2008-11-20 18:24     ` Cyrill Gorcunov
2008-11-20 18:15 ` Christoph Lameter
2008-11-20 19:58 ` Valdis.Kletnieks
2008-11-20 20:03   ` Pekka Enberg [this message]
2008-11-20 20:10   ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4925C299.6070907@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox