direct-io.hg

view xen/TODO @ 327:cdaace96648d

bitkeeper revision 1.144 (3e74d2c4Sp8uQ7JRHj5sf5cI7xOMQA)

Merge scramble.cl.cam.ac.uk:/usr/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@scramble.cl.cam.ac.uk
date Sun Mar 16 19:38:44 2003 +0000 (2003-03-16)
parents a0c481468997
children 0e31b8633858
line source
2 This is stuff we probably want to implement in the near future. I
3 think I have them in a sensible priority order -- the first few would
4 be nice to fix before a code release. The later ones can be
5 longer-term goals.
7 -- Keir (16/3/03)
10 1. ASSIGNING DOMAINS TO PROCESSORS
11 ----------------------------------
12 More intelligent assignment of domains to processors. In
13 particular, we don't play well with hyperthreading: we will assign
14 domains to virtual processors on the same package, rather then
15 spreading them across processor packages.
17 What we need to do is port code from Linux which stores information on
18 relationships between processors in the system (eg. which ones are
19 siblings in teh same package). We then use this to balance domains
20 across packages, and across virtual processors within a package.
22 2. PROPER DESTRUCTION OF DOMAINS
23 --------------------------------
24 Currently we do not free resources when destroying a domain. This is
25 because they may be tied up in subsystems, and there is no way of
26 pulling them back in a safe manner.
28 The fix is probably to reference count resources and automatically
29 free them when the count reaches zero. We may get away with one count
30 per domain (for all its resources). When this reaches zero we know it
31 is safe to free everything: block-device rings, network rings, and all
32 the rest.
34 3. FIX HANDLING OF NETWORK RINGS
35 --------------------------------
36 Handling of the transmit rings is currently very broken (for example,
37 sending an inter-domain packet will wedge the hypervisor). This is
38 because we may handle packets out of order (eg. inter-domain packets
39 are handled eagerly, while packets for real interfaces are queued),
40 but our current ring design really assumes in-order handling.
42 A neat fix will be to allow responses to be queued in a different
43 order to requests, just as we already do with block-device
44 rings. We'll need to add an opaque identifier to ring entries,
45 allowing matching of requests and responses, but that's about it.
47 4. GDT AND LDT VIRTUALISATION
48 -----------------------------
49 We do not allow modification of the GDT, or any use of the LDT. This
50 is necessary for support of unmodified applications (eg. Linux uses
51 LDT in threaded applications, while Windows needs to update GDT
52 entries).
54 I have some text on how to do this:
55 /usr/groups/xeno/discussion-docs/memory_management/segment_tables.txt
56 It's already half implemented, but the rest is still to do.
58 5. DOMAIN 0 MANAGEMENT DAEMON
59 -----------------------------
60 A better control daemon is required for domain 0, which keeps proper
61 track of machine resources and can make sensible policy choices. This
62 may require support in Xen; for example, notifications (eg. DOMn is
63 killed), and requests (eg. can DOMn allocate x frames of memory?).
65 6. ACCURATE TIMERS AND WALL-CLOCK TIME
66 --------------------------------------
67 Currently our long-term timebase free runs on CPU0, with no external
68 calibration. We should run ntpd on domain 0 and allow this to warp
69 Xen's timebase. Once this is done, we can have a timebase per CPU and
70 not worry about relative drift (since they'll all get sync'ed
71 periodically by ntp).
73 7. NEW DESIGN FEATURES
74 ----------------------
75 This includes the last-chance page cache, and the unified buffer cache.
79 Graveyard
80 *********
82 Following is some description how some of the above might be
83 implemented. Some of it is superceded and/or out of date, so follow
84 with caution.
86 Segment descriptor tables
87 -------------------------
88 We want to allow guest OSes to specify GDT and LDT tables using their
89 own pages of memory (just like with page tables). So allow the following:
90 * new_table_entry(ptr, val)
91 [Allows insertion of a code, data, or LDT descriptor into given
92 location. Can simply be checked then poked, with no need to look at
93 page type.]
94 * new_GDT() -- relevent virtual pages are resolved to frames. Either
95 (i) page not present; or (ii) page is only mapped read-only and checks
96 out okay (then marked as special page). Old table is resolved first,
97 and the pages are unmarked (no longer special type).
98 * new_LDT() -- same as for new_GDT(), with same special page type.
100 Page table updates must be hooked, so we look for updates to virtual page
101 addresses in the GDT/LDT range. If map to not present, then old physpage
102 has type_count decremented. If map to present, ensure read-only, check the
103 page, and set special type.
105 Merge set_{LDT,GDT} into update_baseptr, by passing four args:
106 update_baseptrs(mask, ptab, gdttab, ldttab);
107 Update of ptab requires update of gtab (or set to internal default).
108 Update of gtab requires update of ltab (or set to internal default).
111 The hypervisor page cache
112 -------------------------
113 This will allow guest OSes to make use of spare pages in the system, but
114 allow them to be immediately used for any new domains or memory requests.
115 The idea is that, when a page is laundered and falls off Linux's clean_LRU
116 list, rather than freeing it it becomes a candidate for passing down into
117 the hypervisor. In return, xeno-linux may ask for one of its previously-
118 cached pages back:
119 (page, new_id) = cache_query(page, old_id);
120 If the requested page couldn't be kept, a blank page is returned.
121 When would Linux make the query? Whenever it wants a page back without
122 the delay or going to disc. Also, whenever a page would otherwise be
123 flushed to disc.
125 To try and add to the cache: (blank_page, new_id) = cache_query(page, NULL);
126 [NULL means "give me a blank page"].
127 To try and retrieve from the cache: (page, new_id) = cache_query(x_page, id)
128 [we may request that x_page just be discarded, and therefore not impinge
129 on this domain's cache quota].