update xen design
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 5 Dec 2006 22:11:28 +0000 (22:11 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 5 Dec 2006 22:11:28 +0000 (22:11 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2285 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/doc/developer/lttng-xen.txt [new file with mode: 0644]

diff --git a/ltt/branches/poly/doc/developer/lttng-xen.txt b/ltt/branches/poly/doc/developer/lttng-xen.txt
new file mode 100644 (file)
index 0000000..0c26a4b
--- /dev/null
@@ -0,0 +1,83 @@
+
+
+LTTng for Xen
+
+Design document
+
+Mathieu Desnoyers, November 2006
+
+Last modification :
+
+Only allow a single channel. Directory consumed by a lttd-xen client through
+hypercalls. This design choice is made because there are no RCU lists and there
+is no link between the number of CPUs seen by Xen and number of CPUs in the
+dom0.
+
+Does better than Xentrace :
+Variable size records
+Easily extensible event description
+// not planned : missing RCU list. Multiple active traces
+Reader uses poll()-like mechanism instead of polling the buffers each 100ms.
+
+
+* Dom0 lttd-xen process
+
+Does an hypercall to map the buffers.
+Does an hypercall to poll for data, put to sleep by the OS.
+Uses write from the mapped buffers to a file.
+
+
+* Xen
+
+tb_control (hypercalls seen from dom0 OS)
+- trace_create
+Map a page for control information, return it for mapping by user space. (rw)
+Map multiple pages for buffers. return them for mapping by user space.
+(shared, read-only for consumer)
+- trace_start
+Activate tracing in control information.
+- trace_stop
+Stop tracing in control information.
+- trace_destroy
+wait for pending writers (is the hypervisor preemptible ? not full.)
+  Preemption : not full -> spinlock does not disable preemption : would deadlock
+  for the non irq_disable case.
+  volountary : poll call -> volountary. explicit __schedule call., do_yield().
+Quiescent state detection.
+  for_each_domain( d )
+    for_each_vcpu( d, v )
+      vcpu_sleep_sync(v);
+destroy the channels
+
+Events coming from xen :
+- Buffer switch
+  through virq sent to dom0
+
+
+
+* Dom0 Linux OS
+
+Receive virq upon buffer switch.
+xen_wakeup_readers handler : wakes up the readers for the channel.
+
+Hypercalls are autonomous from LTTng linux kernel tracing.
+
+on lttngxentrace create, hypercall channel_create
+on lttngxentrace start, hypercall channel_start
+on lttngxentrace stop, hypercall channel_stop
+on lttngxentrace destroy, hypercall channel_destroy
+
+
+* Facilities
+
+Export a facilities per cpu channel too.
+
+
+Q1 : In Xen preemptible ? Full ? Volountary ? Volountary X
+Q2 : How to synchronize to wait for writers to finish writing ? X
+
+
+Number of CPUs in dom0 != number of CPUs in Xen.
+CPU hotplug in kernel tracing ? Done.
+
+
This page took 0.024924 seconds and 4 git commands to generate.