public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: John Reiser <jreiser@BitWagon.com>
Cc: Jeff Dike <jdike@karaya.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	Julian Seward <jseward@acm.org>
Subject: Re: Valgrind meets UML
Date: 21 Dec 2002 11:07:48 -0800	[thread overview]
Message-ID: <1040497668.4785.33.camel@ixodes.goop.org> (raw)
In-Reply-To: <3E047D6C.1030702@BitWagon.com>

On Sat, 2002-12-21 at 06:40, John Reiser wrote:
> In order to prevent races between valgrind for UML and kernel allocators which
> valgrind does not "know", then the VALGRIND_* declarations being added to kernel
> allocators should allow for expressing the concept "atomically change state in
> both allocator and valgrind". 

Valgrind doesn't sit on the side and observe the kernel.  A better way
of viewing it is as a synthetic CPU which does a lot more error checking
than a typical CPU.  Valgrind itself is running all code, so there is no
scope for Valgrind and the kernel to get out of sync.  You can view the
VALGRIND_* declarations as being extensions to the instruction set. 

If UML were "SMP" (ie, multithreaded), then Valgrind would emulate all
the CPUs and their concurrency; at most you'd need to use the normal
synchronisation mechanisms to control the sequencing of the VALGRIND_*
directives with respect to allocators running on other CPUs/in other
threads.

On the other hand, if you view the directives that Jeff is proposing as
a more general set of directives for any tool to use to instrument the
kernel, then you might need to thinking about things in more detail.  On
the other hand, that smacks of over-design unless there's something
which can make immediate use of such hooks now (and therefore guide the
design).  

Putting the VALGRIND_* hooks (or some thin sugar wrapping) in now in the
appropriate places will mark where any further work should be done, so
should be enough for now.

	J


      parent reply	other threads:[~2002-12-21 18:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-20  2:41 Valgrind meets UML Jeff Dike
2002-12-20 15:26 ` John Reiser
2002-12-20 22:58   ` Jeff Dike
2002-12-20 23:32     ` John Reiser
2002-12-21  2:49       ` Jeff Dike
2002-12-21  7:32         ` Jeremy Fitzhardinge
2002-12-21 16:05           ` Jeff Dike
2002-12-21 14:40 ` John Reiser
2002-12-21 16:07   ` Jeff Dike
2002-12-21 16:15     ` John Reiser
2002-12-21 18:57       ` Jeff Dike
2002-12-21 19:07   ` Jeremy Fitzhardinge [this message]

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=1040497668.4785.33.camel@ixodes.goop.org \
    --to=jeremy@goop.org \
    --cc=jdike@karaya.com \
    --cc=jreiser@BitWagon.com \
    --cc=jseward@acm.org \
    --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