mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Christoph Lameter <cl@linux-foundation.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	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 14:58:28 -0500	[thread overview]
Message-ID: <28180.1227211108@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Thu, 20 Nov 2008 19:44:00 +0300." <20081120164400.GC7363@localhost>

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

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?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  parent reply	other threads:[~2008-11-20 19:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 16:44 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 [this message]
2008-11-20 20:03   ` Pekka Enberg
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=28180.1227211108@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    /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

all inboxes | Powered by JetHome®