update compat
[lttv.git] / ltt / branches / poly / doc / developer / lttng-xen.txt
CommitLineData
d3a1730c 1
2
3LTTng for Xen
4
5Design document
6
7Mathieu Desnoyers, November 2006
8
9Last modification :
10
11Only allow a single channel. Directory consumed by a lttd-xen client through
12hypercalls. This design choice is made because there are no RCU lists and there
13is no link between the number of CPUs seen by Xen and number of CPUs in the
14dom0.
15
16Does better than Xentrace :
17Variable size records
18Easily extensible event description
19// not planned : missing RCU list. Multiple active traces
20Reader uses poll()-like mechanism instead of polling the buffers each 100ms.
21
22
23* Dom0 lttd-xen process
24
25Does an hypercall to map the buffers.
26Does an hypercall to poll for data, put to sleep by the OS.
27Uses write from the mapped buffers to a file.
28
29
30* Xen
31
32tb_control (hypercalls seen from dom0 OS)
33- trace_create
34Map a page for control information, return it for mapping by user space. (rw)
35Map multiple pages for buffers. return them for mapping by user space.
36(shared, read-only for consumer)
37- trace_start
38Activate tracing in control information.
39- trace_stop
40Stop tracing in control information.
41- trace_destroy
42wait for pending writers (is the hypervisor preemptible ? not full.)
43 Preemption : not full -> spinlock does not disable preemption : would deadlock
44 for the non irq_disable case.
45 volountary : poll call -> volountary. explicit __schedule call., do_yield().
46Quiescent state detection.
47 for_each_domain( d )
48 for_each_vcpu( d, v )
49 vcpu_sleep_sync(v);
50destroy the channels
51
52Events coming from xen :
53- Buffer switch
54 through virq sent to dom0
55
56
57
58* Dom0 Linux OS
59
60Receive virq upon buffer switch.
61xen_wakeup_readers handler : wakes up the readers for the channel.
62
63Hypercalls are autonomous from LTTng linux kernel tracing.
64
65on lttngxentrace create, hypercall channel_create
66on lttngxentrace start, hypercall channel_start
67on lttngxentrace stop, hypercall channel_stop
68on lttngxentrace destroy, hypercall channel_destroy
69
70
71* Facilities
72
73Export a facilities per cpu channel too.
74
75
76Q1 : In Xen preemptible ? Full ? Volountary ? Volountary X
77Q2 : How to synchronize to wait for writers to finish writing ? X
78
79
80Number of CPUs in dom0 != number of CPUs in Xen.
81CPU hotplug in kernel tracing ? Done.
82
83
This page took 0.025325 seconds and 4 git commands to generate.