OpenSolaris发布基于build66的Xen版本
Solaris Xen updateAfter an undesirably long time, I'm happy to say that another drop of Solarison Xen is available here.Documentation can be found at our community site.Sources and other sundry parts are here. As you mightexpect, there's been a massive amount of change since the last OpenSolarisrelease.
This time round, we are based on Xen 3.0.4 and build 66 of Nevada. As always,we'd love to hear about your experiences if you try it out, either on the mailing listor the IRC channel.
In many ways, the most significant change is the huge effort we've put in tostabilize our codebase; a significant number of potential hangs, crashes, andcore dumps have been resolved, and we hope we're converging on a good-qualityrelease. We've started looking seriously at performance issues, and filling inthe implementation gaps. Since the last drop, notable improvements include:
PAE supportBy default, we now use PAE mode on 32-bit, aiding compatibility with otherdomain 0 implementations; we also can boot under either PAE or non-PAE, if theXen version has 'bi-modal' support. This has probably been the most-requestedchange missing from our last release.HVM supportIf you have the right CPU, you can now run fully-virtualized domains such asWindows using a Solaris dom0! Whilst more work is needed here, this does seem towork pretty well already.New management toolsWe have integrated the virt- suite of management tools. virt-manager provides a simple GUI forcontrolling guest domains on a single host. virt-install andvirsh are simple CLIs for installing and managing guest domainsrespectively. Note that parts of these tools are pre-alpha, and we still have asignificant amount of work to do on them. Nonetheless, we appreciate anycomments...PV framebufferSolaris dom0 now supports the SDL-based paravirt framebuffer backend, whichcan be used with domUs that have PV framebuffer support.Virtual NIC supportThe Ethernet bridge used in the previous release has been replaced withvirtual NICs from the Crossbow project.This enables future work around smart NICs, resource controls, and more.Simplified Solaris guest domain installIt's now easy to install a new Solaris guest domain using the DVD ISO. Thetemporary tool in the last release, vbdcfg, has disappeared now as aresult.Better SMF usageSeveral of the xend configuration properties are now controlled using theSMF framework.Managed domain supportWe now support xend-managed domain configurations instead of using.py configuration files. Certain parts of this don't work too well yet(unfortunately all versions of Xen have similar problems), but we are pluggingin the gaps here one by one.Memory ballooning supportOtherwise known as support for dynamic xm mem-set, this allows muchgreater flexibility in partitioning the physical memory on a host amongst theguest domains.Vastly improved debugging supportCrash dump analysis and debugging tools have always been a critical featurefor Solaris developers. With this release, we can use Solaris tools to debugboth hypervisor crashes and problems with guest domains. I talk a little bitabout the latter feature below.xvbdb has been renamedTo simply be xdb. This was a very exciting change for certainmembers of our team. We're still working hard on finishing things up for our phase 2 putback intoNevada (where "phase 1" was the separate dbootputback). As well as finishing this work, we're starting to look at furtherenhancements, in particular some features that are available in other vendors'implementations, such as a hypervisor-copy based networking device, blktapsupport, para-virtualized drivers for HVM domains (a huge performance fix), andmore.
Debugging guest domains
Here I'll talk a little about one of the more minor new features that hasnonetheless proven very useful. The xm dump-core command generates animage file of a running domain. This file is a dump of all memory owned by therunning domain, so it's somewhat similar to the standard Solaris crash dumpfiles. However, dump-core does not require any interactionwith the domain itself, so we can grab such dumps even if the domain is unableto create a crash dump via the normal method (typically, it hangs and can't beinteracted with), or something else prevents use of the standard Solaris kerneldebugging facilities such as kmdb (an in-kernel debugger isn't veryuseful if the console is broken).
However, this also means that we have no control over the format used by theimage file. With Xen 3.0.4, it's rather basic and difficult to work with. Thisis much improved in Xen 3.1, but I haven't yet written the support for the newformat.
To add support for debugging such image files of a Solaris domain, I modifiedmdb(1) to understand the format of the image file (the alternative, providing aconversion step, seemed unneccessarily awkward, and would have had to throw awayinformation!). As you can see if you look around usr/src/cmd/mdb in thesource drop, mdb(1) loads a module called mdb_kb when debugging suchimage files. This provides simple methods for reading data from the image file.For example, to read a particular virtual address, we need to use the contentsof the domain's page tables in the image file to resolve it to a physical page,then look up the location of that page in the file. This differs considerablyfrom how libkvm works with Solaris crash dumps: there, we have a bigarray of address translations, which is used directly, instead of the page tablecontents.
In most other respects, debugging a kernel domain image is much the same as acrash dump:
# xm dump-core solaris-domu core.domu
# mdb core.domu
mdb: warning: dump is from SunOS 5.11 onnv-johnlev; dcmds and macros may not match kernel implementation
Loading modules: [ unix genunix specfs dtrace xpv_psm scsi_vhci ufs ... sppp ptm crypto md fcip logindmux nfs ]
> ::status
debugging domain crash dump core.domu (64-bit) from sxc16
operating system: 5.11 onnv-johnlev (i86pc)
> ::cpuinfo
ID ADDR FLG NRUN BSPL PRI RNRN KRNRN SWITCH THREAD PROC
0 fffffffffbc4b7f01b 40 9 169yes yes t-1408926 ffffff00010bfc80 sched
> ::evtchns
Type Evtchn IRQ IPL CPU ISR(s)
evtchn 1 257 1 0 xenbus_intr
evtchn 2 260 9 0 xenconsintr
virq:debug 3 256 150 xen_debug_handler
virq:timer 4 258 140 cbe_fire
evtchn 5 259 5 0 xdf_intr
evtchn 6 261 6 0 xnf_intr
evtchn 7 262 6 0 xnf_intr
> ::cpustack -c 0
cbe_fire+0x5c()
av_dispatch_autovect+0x8c(102)
dispatch_hilevel+0x1f(102, 0)
switch_sp_and_call+0x13()
do_interrupt+0x11d(ffffff00010bfaf0, fffffffffbc86f98)
xen_callback_handler+0x42b(ffffff00010bfaf0, fffffffffbc86f98)
xen_callback+0x194()
av_dispatch_softvect+0x79(a)
dispatch_softint+0x38(9, 0)
switch_sp_and_call+0x13()
dosoftint+0x59(ffffff0001593520)
do_interrupt+0x140(ffffff0001593520, fffffffffbc86048)
xen_callback_handler+0x42b(ffffff0001593520, fffffffffbc86048)
xen_callback+0x194()
sti+0x86()
_sys_rtt_ints_disabled+8()
intr_restore+0xf1()
disp_lock_exit+0x78(fffffffffbd1b358)
turnstile_wakeup+0x16e(fffffffec33a64d8, 0, 1, 0)
mutex_vector_exit+0x6a(fffffffec13b7ad0)
xenconswput+0x64(fffffffec42cb658, fffffffecd6935a0)
putnext+0x2f1(fffffffec42cb3b0, fffffffecd6935a0)
ldtermrmsg+0x235(fffffffec42cb2b8, fffffffec3480300)
ldtermrput+0x43c(fffffffec42cb2b8, fffffffec3480300)
putnext+0x2f1(fffffffec42cb560, fffffffec3480300)
xenconsrsrv+0x32(fffffffec42cb560)
runservice+0x59(fffffffec42cb560)
queue_service+0x57(fffffffec42cb560)
stream_service+0xdc(fffffffec42d87b0)
taskq_d_thread+0xc6(fffffffec46ac8d0)
thread_start+8()
Note that both ::cpustack and ::cpuregs are capable ofusing the actual register set at the time of the dump (since the hypervisorneeds to store this for scheduling purposes). You can also see the::evtchns dcmd in action here; this is invaluable for debugginginterrupt problems (and we've fixed a lot of those over the past yearor so!).
Currently, mdb_kb only has support for image files ofpara-virtualized Solaris domains. However, that's not the only interestingtarget: in particular, we could support mdb in live crash dump mode against arunning Solaris domain, which opens up all sorts of interesting debuggingpossibilities. With a small tweak to Solaris, we can support debugging offully-virtualized Solaris instances. It's not even impossible to imagine addingLinux kernel support to mdb(1), though it's hard to imagine there would be alarge audience for such a feature...
版权声明:本文为博主原创文章,未经博主允许不得转载。
页:
[1]