All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xensource.com>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: LTTng-Xen Buffer shared between the hypervisor and a dom0 process
Date: Thu, 08 Mar 2007 10:02:44 +0000	[thread overview]
Message-ID: <C2158FC4.B05C%keir@xensource.com> (raw)
In-Reply-To: <20070308092627.GB30932@Krystal>

On 8/3/07 09:26, "Mathieu Desnoyers" <compudj@krystal.dyndns.org> wrote:

> Not exactly : when xen wants to end writing to its buffers, it disables
> writing, does a subbuffer switch and sets the buffer "finalize" flag to
> 1.  It then sends a VIRQ to lttd-xen. lttd-xen reads the last subbuffers
> (using a get_cpu/put_cpu and get_facilities/put_facilities cmd of the
> ltt hypercall to select the offset to read and then reads the buffers)
> and is then ready to release the buffers. At that specific point, I
> would like all the trace information (xmalloc'd and xenheap shared) to
> be freed. But I would also like it to be freed if lttd is killed (so
> when file descriptors and memory maps are freed).

This latter part sounds kind of tricky to do cleanly. How do we distinguish
between refcount being zero because lttd-xen has died, versus refcount being
zero because lttd-xen hasn't yet mapped the buffers? I think it's hard to
reliably provide process scope for physical resources without assistance
from the guest kernel (but I'll be happy to be proven wrong!).

In xentrace (which incidentally is this intended to replace? Or complement?)
the buffer lifetime is quite separate from the lifetime of xentrace daemon
invocations. That's just what turned out to be easiest to implement with no
guest kernel modifications. However if that's not a good model for LTTng
then we can certainly consider if extra support, in guest kernel or in
hypervisor, is warranted.

 -- Keir

  reply	other threads:[~2007-03-08 10:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 19:24 LTTng-Xen Buffer shared between the hypervisor and a dom0 process Mathieu Desnoyers
2007-03-08  7:51 ` Keir Fraser
2007-03-08  9:26   ` Mathieu Desnoyers
2007-03-08 10:02     ` Keir Fraser [this message]
2007-03-08 19:30       ` Mathieu Desnoyers
2007-03-09  9:11         ` Keir Fraser
2007-03-10  3:02           ` Mathieu Desnoyers
2007-03-10 17:18             ` Keir Fraser

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=C2158FC4.B05C%keir@xensource.com \
    --to=keir@xensource.com \
    --cc=compudj@krystal.dyndns.org \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.