Re: [uml-devel] synchronous hostfs
On Thursday 30 December 2004 05:16, Michael Richardson wrote: > > "Blaisorblade" == Blaisorblade <[EMAIL PROTECTED]> writes: > >> I'm running 2.4.26-um3. I happen to be running hostfs with NFS > >> underneath. I get core dumps from my application, and I want to > >> gdb them outside of the UML. > >> > >> I had to switch from core dump to NFS (which seems to fail now) > >> to putting them in /tmp (which is ramdisk), and then move them to > >> /var/tmp, which is hostfs. > > Blaisorblade> Hmm - were you putting the core dumps inside a hostfs > Blaisorblade> mount, right? This has been reported to fail badly > > Yes, previously. > > Blaisorblade> with 2.4.26-3um... the hostfs contained in 2.4.24-1um > Blaisorblade> and 2.4.27-1bs (this tree is from me, on my homepage) > Blaisorblade> is stable, while the one in 2.4.24-2um and subsequent > Blaisorblade> releases isn't. > > I'll try it on my next compile. > > >> Is there some way to defeat the caching that is occuring? or > >> even to just flush it? (other than umount) > > Blaisorblade> Hmmm, I don't know this... probably giving "sync" > Blaisorblade> inside UML should work. I remember that Jeff said > Blaisorblade> that he made hostfs asynchronous in those releases on > Blaisorblade> purpose (for performance, IIRC), and this is not bad. > I actually wonder if there is really any advantage. When answering I've not discussed this because I wasn't really sure... you can read the exact message in the diary page on the website > I'd like to be convinced. The performance problem has shown some times and been analyzed on the MLs, only that it happened with UBD... search "bonnie++" and "performance" and you should find your answer... In short, if the UML kernel executes a blocking FS operation, the UML virtual machine is locked for a while; what must happen is instead that the operation is performed on behalf of the UML kernel while it continues to run... this will be indeed possible when we will fully use AIO (the code for this has been written by Jeff, I don't know if it already works or not). > It seems that for executables, > mapping hostfs files straight into the > guest address space > wouldn't care. It's not very clear to me what you mean... Well, 1) whether hostfs data are mapped or copied is not related to the synchronous/asynchronous question; the idea was born to avoid memory waste and double caching by both UML and the host... which happens even if the data are clean (is this what you mean by > I'd have thought that for stdio > things, that any buffering done by guest kernel would be really just > wasted. For stdio, there is 0 difference between the host and guest kernel... > glibc has already buffered pretty much everything... Well, the glibc buffer is one little and pretty thing for one application only. The kernel buffer can buffer tons of datas, because is shared by the system and the kernel knows a lot more things than glibc... 2) the UML kernel *will* anyhow perform some kind of caching... we cannot rewrite the VM to allow avoid it. If there are ideas to solve this problem can be solved in some non-intrusive way, they are well accepted... however maybe using mapping from hostfs could already solve most problems that are born from this. > However, I'd like to be able to turn it off. This could be done, i.e. some code could be written in the future for that. For now, both 2.4.27-bs1 and 2.6.9/2.6.9-bb4/2.6.10 don't include the hostfs rewrite. However, note that hostfs has never been really synchronous. Try to do a tail -f inside hostfs on the guest and to modify the file on the host... this will never succeed on any existing UML. (It could be done using dnotify/inotify and maybe someone started doing it, but that will happen later). -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] 2.6.10 command line longer than 512 characters
On Friday 07 January 2005 12:02, Catalin(ux aka Dino) BOIE wrote: > >> You have a patch at: > >> http://kernel.umbrella.ro/kpatches/uml-extend-cmd-line-limits.patch > > Thank you very much. Is this patch coing to find its way into mainstram > > UML at some point or do I have to look for it in the future too? > I forwarded it to Jeff and it "saw" the linux-kernel mailing list but no > reponse from kernel folks. The UML part is ok, but the general code should be reviewed well and we've had no time until now (also there have been holidays in the middle)... I've added it to my TODO-list, so I hope not to forget it... but it is getting too long :-(. It's not obvious because I want to check properly that there is no bad side effect of that... Bye -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Re: UML fills /tmp irreversibly (2.6.9-bb4 on SuSE 9.2)
On Monday 03 January 2005 15:31, Armin M. Warda wrote: > Hi Gerd, > On Monday 03 January 2005 14:34, you wrote: > > host or uml kernel fix? URL? Havn't tracked stuff at all over > > xmas holidays ... > > Must be a host-Kernel fix, not a uml-kernel fix, because um-kernel > 2.6.9-bb4 running on host-kernels [...] Yes, this is definitely a host bug, which was reported to the appropriate people and fixed... > I scanned the changelog for 2.6.10 but until now failed to identify > the patch: > > http://www.de.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.10 I had read the Changelog from -rc3 to final (after hearing from Christopher Aker that in -bk it had been fixed), and I seemed had a quick shoot about this... it was a fix from Roland McGrath about something strange, which made me guess it was the fix... Roland McGrath: o fix bogus ECHILD return from wait* with zombie group leader I'm not sure this is the fix, but it is possible indeed, given that the problem UML triggered was, IIRC, that when it exited, there wasn't a proper cleanup of the status, and the process became invisible but still kept a reference to the file in /tmp, preventing it from being deleted... The changelog does not mention our particular bug it but there is a good reason for not mentioning it, and it's related to TASK_TRACED which is *the* problem in 2.6.9 with UML. I think you can search for it on linux.bkbits.net... I'll do that when I have time... However, I've received (after 2.6.10) the answer from Roland McGrath (ptrace coder / maintainer) about this problem, and he sent two more patches for this, which I'll bundle in next SKAS as a temp. solution and forward to you... I'll check if it is a complete solution. > Can somebody else on the list help me to identify the patch for > this "problem with /tmp filling irreversibly and being unable to > unmount /tmp" bugfix? Thanks! -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
[uml-devel] How stable is hostfs (and UML in general)?
I want to use UML because I'm building a little uclibc-based distro that has a problem when the system it's building on has a kernel older than the one it's building. I'm testing the build under knoppix (2.6.7 kernel) and building a C library against Maszur's 2.6.9 or 2.6.10 kernel headers, and as soon as I try to run any of the utilities linked against this under the old kernel, they segfault. Obvious solution: instead of doing a chroot for the second half of the build, fire up User Mode Linux built from the newer kernel. Unfortunately, it hasn't been that easy. Using the stock 2.6.9 and 2.6.10 kernels, I built a fairly stripped down version of UML (the config I just used for 2.6.10 is attached), and ran it against the root partition of my little "firmware linux" distro (uclibc based) like so: ./vmlinux rootfstype=hostfs rootflags=/home/knoppix/newbuild/build \ init=/bin/sh (A copy of that root partition is available on request; the bzipped tarball is about 12 megabytes. Or you could concievably build a "somewhat out of date but still shows the problem" version of it yourself from the stuff up on "http://www.landley.net/code/firmware";. Yes this is a strange environment, it's a development system with gcc and binutils, but I replaced all the GNU utilities with busybox. Yes, I got it to work. Mostly. :) Under the UML built from stock 2.6.9 sources, after some tweaking I got it to sort of boot and give me a shell prompt about 1/3 of the time (the other 2/3 of the time it paniced during boot due to various race conditions, but trying it several times in a row usually got me to the shell prompt). I couldn't figure out any way to make it start with a readable hostfs by default, but "mount -o remount,rw / /" once it was up seemed to do the trick, and I can put that in an init script no problem. (And yes it worked: I could create files and have them show up in the host system.) But when trying to compile "hello world", gcc died saying it couldn't find ld. This exact filesystem worked fine chrooting into it on the host kernel, a knoppix system running 2.6.7. Gcc worked great, my whole distro can recompile itself under itself. (For the moment, I'm working around the problem that makes me want to use UML by using maszur's old 2.6.6 kernel headers to build uclibc against.) So I thought "ok, they'll fix it up in 2.6.10". My first attempt at building UML from that at work the build broke saying it had a duplicate symbol definition (even after make clean). Trying again with a clean tarball and not switching so much .config stuff off, I got a UML that worked enough to let me run it against a Red Hat Enterprise Server 2.1 partition I had lying around, which actually built a small software package successfully (if very, very slowly: a dual 3ghz pentium 4 compiling slower than my 700 mhz laptop). But it hung hard (and reproducibly, after a kill and a restart) when I tried to tab complete something in bash. Had to kill it from another window. Oh, and it always dumped a stack trace on bootup, right before it gave me a shell prompt. I don't know why. So now I'm trying it on my laptop. I compiled with the attached configuration (again, stock 2.6.10 source), ran it with a hostfs root partition pointing at my little uclibc system, and it panics on startup every time. So far, I've seen three different types of panics at different points in the boot process: mconsole (version 2) initialized on /home/knoppix/.uml/WGIHE3/mconsole audit: initializing netlink socket (disabled) audit(300.210:0): initialized Initializing Cryptographic API Kernel panic - not syncing: fix_range fixing wrong address space, current = 0xa0cb90a0 mconsole (version 2) initialized on /home/knoppix/.uml/0o1hM7/mconsole Kernel panic - not syncing: read of switch_pipe failed, errno = 9 And another one that's basically the second one with errno=0. What I haven't seen yet is the shell prompt. The host system (my laptop) has been steady as a rock for three months, it's not bad memory or anything. I'm guessing the 2.6.9 instabity might have been because I'm trying to use hostfs, but the panics I'm getting with 2.6.10 happen before it tries to mount the root partition. I'm probably doing something wrong, but I have no idea what. So my first question: Is there something other than the released kernel I should be trying? There used to be a seperate UML tree, but all I can find is 2.4, which doesn't interest me... Jeff's patch directory (which I found through his blog) is almost entirely x86-64 patches, and my laptop's x86. If I should be over on the -user list, I can do that, but I know exactly what I want to get this thing to do, and at this point expect to have to poke around in the code to get it to actually do it. I've read through tutorials on setting up virtual crossover cables and virtual hubs and it doesn't apply to me. I'm trying for a VERY simple setup: my UML doesn't
Re: [uml-devel] How stable is hostfs (and UML in general)?
Rob Landley wrote: Rob, I may not be able to answer all your questions, but I may be able to offer a few pointers. For the UML kernel version, the stock 2.6.x kernel is getting better, but still isn't the most stable and reliable kernel. Right now, the most stable I've found is using 2.6.9 from kernel.org, with the -bb4 patches from http://www.user-mode-linux.org/~blaisorblade/patches/guest/uml-2.6.9-bb4/ There are several thing you can do to improve the speed at which the UML runs. When UML starts, it opens a file in /tmp (or somewhere else if TMPDIR is set), mmaps it, and uses that as its memory. To speed this up, make sure that it's located on a tmpfs-mounted filesystem (so it's real memory). fstab: none /UML/MEMORY tmpfs defaults,size=768M 0 0 Starting the UML: export TMPDIR=/UML/MEMORY /UML/linux ... Also, with an unpatched host kernel, your UML will run slower. If possible, patch the host kernel to allow UMLs to run in SKAS mode and take advantage of some SYSEMU code. These patches are also here: http://www.user-mode-linux.org/~blaisorblade/patchlist.html or you can get the 2.6.10 host patch from http://uml.tuxrocks.com/Patches/host-skas3-2.6.10-v7.patch I don't know much about hostfs, so I can't give any real ideas there. UML doesn't support TLS yet, so make sure that your UML root_fs doesn't have a /lib/tls directory. Hope this helps, Frank -- Frank Sorenson - KD7TZK Systems Manager, Computer Science Department Brigham Young University [EMAIL PROTECTED] --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
