* [uml-devel] synchronous hostfs
@ 2004-12-26 18:16 Michael Richardson
2004-12-29 18:06 ` Blaisorblade
0 siblings, 1 reply; 4+ messages in thread
From: Michael Richardson @ 2004-12-26 18:16 UTC (permalink / raw)
To: user-mode-linux-devel
-----BEGIN PGP SIGNED MESSAGE-----
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.
Still, I now have to use unique file names, or things get confused
between host and guest.
I also like to do:
"make DESTDIR=/uml/root/file install"
from outside. This now only has effect if I umount/mount the file
system. (I know have a /usr/local mount just for this, even though
/usr/local is inside of /)
It used to be that this was a problem only if the program was running.
Is there some way to defeat the caching that is occuring?
or even to just flush it? (other than umount)
- --
] ON HUMILITY: to err is human. To moo, bovine. | firewalls [
] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[
] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys
iQCVAwUBQc7/64qHRg3pndX9AQHUpQP9Fo08vmYRdHJ8emMvUsS5a05oAxNfpt5q
qELzCip/zknhJWKojR7JkbpzQdW0jtTbSBnq+B3HaUeFBCwoA8wGOCNd1h8BGkIX
lolSgHJOOco6V01f/yct1rhoPv7NxUavsMCyoTVMC1QsFrHuN++69vMqeZcJjQ2K
6bS8IkpswgA=
=KJhJ
-----END PGP SIGNATURE-----
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [uml-devel] synchronous hostfs 2004-12-26 18:16 [uml-devel] synchronous hostfs Michael Richardson @ 2004-12-29 18:06 ` Blaisorblade 2004-12-30 4:16 ` Michael Richardson 0 siblings, 1 reply; 4+ messages in thread From: Blaisorblade @ 2004-12-29 18:06 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Michael Richardson On Sunday 26 December 2004 19:16, Michael Richardson wrote: > 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. Hmm - were you putting the core dumps inside a hostfs mount, right? This has been reported to fail badly with 2.4.26-3um... the hostfs contained in 2.4.24-1um and 2.4.27-1bs (this tree is from me, on my homepage) is stable, while the one in 2.4.24-2um and subsequent releases isn't. > Still, I now have to use unique file names, or things get confused > between host and guest. > > I also like to do: > "make DESTDIR=/uml/root/file install" > from outside. This now only has effect if I umount/mount the file > system. (I know have a /usr/local mount just for this, even though > /usr/local is inside of /) > It used to be that this was a problem only if the program was running. > Is there some way to defeat the caching that is occuring? > or even to just flush it? (other than umount) Hmmm, I don't know this... probably giving "sync" inside UML should work. I remember that Jeff said that he made hostfs asynchronous in those releases on purpose (for performance, IIRC), and this is not bad. -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] synchronous hostfs 2004-12-29 18:06 ` Blaisorblade @ 2004-12-30 4:16 ` Michael Richardson 2005-01-04 20:00 ` Blaisorblade 0 siblings, 1 reply; 4+ messages in thread From: Michael Richardson @ 2004-12-30 4:16 UTC (permalink / raw) To: Blaisorblade; +Cc: user-mode-linux-devel -----BEGIN PGP SIGNED MESSAGE----- >>>>> "Blaisorblade" == Blaisorblade <blaisorblade@yahoo.it> 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. I'd like to be convinced. It seems that for executables, mapping hostfs files straight into the guest address space wouldn't care. I'd have thought that for stdio things, that any buffering done by guest kernel would be really just wasted. glibc has already buffered pretty much everything... However, I'd like to be able to turn it off. - -- ] ON HUMILITY: to err is human. To moo, bovine. | firewalls [ ] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[ ] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[ ] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Finger me for keys iQCVAwUBQdOBE4qHRg3pndX9AQH1dgQA6/oZIVgXnHeGVzfe607Lm5+FRfne0Sw7 OuNd3+mgbEpZMxExMI1bMPv0mvDD7SCoHjy3Fn7nR61n5iOLeAOOxIIuPxvzmzsO Hc1jh8NQQARsBrIqpJKW+5UO5Y7Vr0BE6V990QPa/Yhv0T4vSQOucP5IZfvV6yAN Q8gwgs6zd34= =9+kS -----END PGP SIGNATURE----- ------------------------------------------------------- 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, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] synchronous hostfs 2004-12-30 4:16 ` Michael Richardson @ 2005-01-04 20:00 ` Blaisorblade 0 siblings, 0 replies; 4+ messages in thread From: Blaisorblade @ 2005-01-04 20:00 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Michael Richardson On Thursday 30 December 2004 05:16, Michael Richardson wrote: > >>>>> "Blaisorblade" == Blaisorblade <blaisorblade@yahoo.it> 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, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-08 10:02 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-12-26 18:16 [uml-devel] synchronous hostfs Michael Richardson 2004-12-29 18:06 ` Blaisorblade 2004-12-30 4:16 ` Michael Richardson 2005-01-04 20:00 ` Blaisorblade
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox