mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] slub: add hooks for kmemcheck
Date: Fri, 18 Apr 2008 16:06:52 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0804181604310.4046@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <19f34abd0804181527i3b65e82bk2a5d8b3c2b196f9e@mail.gmail.com>

On Sat, 19 Apr 2008, Vegard Nossum wrote:

> We set it to zero to allow the compiler to optimize out code if
> CONFIG_KMEMCHECK=n. For instance
> 
>         if (kmemcheck_page_is_tracked(page) && !(s->flags & SLAB_NOTRACK)) {
> 
> Will be turned into if(0 && !(s->flags & 0)), which can be completely
> optimized away. On the other hand, if SLAB_NOTRACK is non-zero, this
> is not the case, since the flag must be tested.

The compiler will optize it again regardless of SLAB_NOTRACK. if (0 && 
whatever) is still 0.

> >  Should this not go into some kmemcheck.h file?
> 
> The implementations of these prototypes are in mm/slub_kmemcheck.c.
> They are only ever called from slub.c since they represent the
> interface between SLUB and kmemcheck.
> 
> Would you rather have it in include/linux/slub_kmemcheck.h?

Well lets see what Pekka says.

> Currently, with SLAB/SLUB debugging enabled, the page flag will be
> cleared, then accessed in check_object(), thus generating a few
> accesses to the page. It is safer to delay the clearing of the page
> flag until no more accesses can be generated for the page.

Hmmmm.. Okay that is already dealt with by a patch in Pekka's tree.

  reply	other threads:[~2008-04-18 23:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18 22:03 Vegard Nossum
2008-04-18 22:12 ` Christoph Lameter
2008-04-18 22:27   ` Vegard Nossum
2008-04-18 23:06     ` Christoph Lameter [this message]
2008-04-18 23:21       ` Pekka Enberg
  -- strict thread matches above, loose matches on Subject: below --
2008-04-04 13:44 [ANNOUNCE] kmemcheck v7 Vegard Nossum
2008-04-04 13:47 ` [PATCH 3/3] slub: add hooks for kmemcheck Vegard Nossum

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=Pine.LNX.4.64.0804181604310.4046@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=vegard.nossum@gmail.com \
    /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®