Pete Zaitcev | 1 Mar 04:19 2004
Picon

missed_ticks (2.6)

Hi,

I was looking at the way timer works on UML and noticed that missed_ticks
is not actually used for anything. Is there a plan for it? If not, maybe
we should drop it.

Cheers,
-- Pete

diff -ur -X dontdiff linux-2.6.3-rc2-uml-1/arch/um/kernel/skas/trap_user.c linux-2.6.3-rc2-uml-1-t1/arch/um/kernel/skas/trap_user.c
--- linux-2.6.3-rc2-uml-1/arch/um/kernel/skas/trap_user.c	2004-02-15 21:26:30.000000000 -0800
+++ linux-2.6.3-rc2-uml-1-t1/arch/um/kernel/skas/trap_user.c	2004-02-29 18:48:11.000000000 -0800
 <at>  <at>  -35,8 +35,6  <at>  <at> 
 	errno = save_errno;
 }

-extern int missed_ticks[];
-
 void user_signal(int sig, union uml_pt_regs *regs)
 {
 	struct signal_info *info;
diff -ur -X dontdiff linux-2.6.3-rc2-uml-1/arch/um/kernel/time_kern.c linux-2.6.3-rc2-uml-1-t1/arch/um/kernel/time_kern.c
--- linux-2.6.3-rc2-uml-1/arch/um/kernel/time_kern.c	2004-02-15 21:26:31.000000000 -0800
+++ linux-2.6.3-rc2-uml-1-t1/arch/um/kernel/time_kern.c	2004-02-29 19:02:44.000000000 -0800
 <at>  <at>  -41,12 +41,6  <at>  <at> 
 /* Changed at early boot */
 int timer_irq_inited = 0;

-/* missed_ticks will be modified after kernel memory has been 
- * write-protected, so this puts it in a section which will be left 
(Continue reading)

Jeff Dike | 1 Mar 05:33 2004

Re: missed_ticks (2.6)

On Sun, Feb 29, 2004 at 07:19:32PM -0800, Pete Zaitcev wrote:
> I was looking at the way timer works on UML and noticed that missed_ticks
> is not actually used for anything. Is there a plan for it? If not, maybe
> we should drop it.

Thanks, I just hadn't got around to cleaning that up.

				Jeff

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
Rahul Deshmukh | 1 Mar 06:40 2004

Re: Re: Kernel panic: VFS: Unable to mount root fs

Hi

Thanks a lot for your mail. As I have missed to select the
option realted to UBD device in Block device while compiling.
Now the problem is get solved.

Rahul.

On Thu, 26 Feb 2004 M A Young wrote :
>On Thu, 26 Feb 2004, Rahul Deshmukh wrote:
>
> >I am facing the problem of "Kernel panic: VFS: Unable to mount root fs" I
> >am not getting what is the solution for the problem.As I have gone
> >through mailing as well got solution as to give root=/dev/ubd/0 . But
> >that thing is also not working.
>
>root=/dev/ubd/0 is for when you have devfs enabled. One of /dev/ubd0
>/dev/ubda or 98:0 should work (assuming you do have a root image called
>root_fs).
>
>      Michael Young



Knowledge speaks, but wisdom listens.



Patrick "Petschge" Kilian | 1 Mar 21:14 2004
Picon

Re: Re: [uml-user] UNIX socket networking

Hi all,

>> Problem 1.) How do I shutdown a kernel thread when the uml goes
>> down? At the moment my patched kernle gets stuck with 100% CPU
>> usage when I trie to shut down the uml kernel.
Ok uml_exitcall fixed this problem.

>> Problem 2.) How can I make sure that my kernel thread I startet
>> after the networking stuff is inited? At the moment I start the
>> kernel thread with a __initcall and just do a sleep(30) in the
>> thread.
> I didn't know about late_initcall, but it sounds promising.
And it works too.

>> Problem 3.) I can only create sockets in the "anonymous" namespace.
>> The normal namespace gives me some error which I don't rememeber
>> right now but I could find out what th errorcode was.
Well bind is returning -2 which seams to be -ENOENT. Does somebody know why 
this happens?

>> I guess the "normal" namespace is PF_LOCAL.
>IIRC yes.
I use PF_UNIX in the code. But that should be the same as PF_LOCAL.

> There has been a lot of request for a such feature, so I would like
> if you can post it here or rather on uml-devel (especially to avoid
> anyone trying it without specific knowledge), even if it is not
> complete. So we could better help you. Also, state whether it is onto
> 2.4 or 2.6.
At the moment I am working on 2.6.0-test11

Thanks for your help,
Patrick "Petschge" Kilian

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
Chris Friesen | 1 Mar 23:07 2004

problems with UML, issues with includes


I'm having issues with UML.

I've got a rootfs that used to work with an older UML.  With 2.4.24, I 
try and boot with the following arguments:

./linux-2.4.24  mem=256M con0=fd:0,fd:1 con=pts ubd0=test,rootfs debug 
msp_view=build_neptune_2.0_int11

The msp_view thing causes additional mounts to be created at init time. 
  However, I get a bunch of errors in my console window when I try to 
log in:

ed Hat Linux release 8.0 (Psyche)
Plankton/CELP 2.5.0 - Kernel 2.4.24-1um on an i686

(none) login: Registering fd 47 twice
Irqs : 3, 3
Ids : 0xa022c3f8, 0xa022c3f8
Registering fd 47 twice
Irqs : 3, 3
Ids : 0xa022c3f8, 0xa022c3f8

If I then keep going, I end up with a whole bunch of lines like:

Failed to forward -1359446016 to pid 16452, err = 9

As part of my efforts to try and debug this, I wanted to dump out the 
names of the processes that were calling os_set_owner().  Accordingly in 
  um/os/file.c I included <linux/sched.c> and wrote some code with 
appropriate locking around the tasklist_lock so that I could match the 
pid against the process name.

When I compiled, it grabbed the sched.h from /usr/include rather than 
from the kernel build, and everything blew up.

So I guess I'm asking for help on two fronts.  1) How do I fix the build 
process to pick up the kernel includes (and why doesn't it do that by 
default?).  2) Any ideas why I'm getting the descriptor thing?

Thanks,

Chris

--

-- 
Chris Friesen                    | MailStop: 043/33/F10
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen <at> nortelnetworks.com

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
Picon

Overhead of UML-skas

Hey Jeff (and any other interested parties) -- this is George Dunlap, from
the CoVirt group at U of M.  I've been testing the overhead of running
workloads under UML compared to on the bare host, and we're getting some
unexpectedly slow numbers -- for the particular benchmark we're using,
about 105% overhead;  I was wondering if you could shed any light on the
subject: has anyone had similar experiences, and are there any obvious 
optimizations we're missing.

We're using 2.4.20-7um, on a 2.4.18 host with the skas patch.  UML has 
raw access to its own disk (via 'raw /dev/raw/raw1 /dev/hdc'), and is 
given 256M (out of 1Gig host memory).  Asyncronous I/O is enabled via the 
helper process.  COW disk mode is off.

The workload we're running is a "kernel build" benchmark, which consists
of the following commands:
  make clean ; make dep ; make bzImage.
This benchmark is run four times: once to warm up the cache, and thrice to 
get "warm cache" numbers.  All runs are taken immediately after booting 
the host kernel and then (if appropriate) the guest kernel.

We're comparing this against a 2.4.20 vanilla kernel using a copy of the 
same disk image, on the same disk.

Host 2.4.20 average:	 93 seconds
UML 2.4.20 average:	192 seconds (105% overhead)

All numbers were run on a P4 3GHz processor.

Two years ago for our ReVirt paper, we did the same test with UMLinux (now
FAUMAchine) (with some optimizations to make it not-dog-slow) on a 1.2GHz
AMD box and got a 70% overhead for that benchmark.  Similar tests at that
time with VMWare got about 30% overhead.

Has anyone else had a similar experience?  Are there any obvious reasons 
why it would be so much slower?

I realize that it's different hardware as well, so I'm not really 
comparing apples to apples.

The "kernel make" benchmark is sort of a wost-case of our "realistic 
workloads" because it makes a lot of system calls and forks a lot of 
processes.  

The numbers are for a RedHat 6.2 kernel image with ext2 FS, but we've
gotten similar ratio for a RedHat 9.0 installation with ext3.  (The
absolute time for both is increased, we think because the newer version of
gcc does more work.)

Any help would be appreciated.

-George Dunlap
PhD Candidate at the University of Michigan

--

-- 
+-------------------+----------------------------------------
| dunlapg <at> umich.edu | http://www-personal.umich.edu/~dunlapg 
+-------------------+----------------------------------------
| "An empty life of luxury is still an empty life"
|    -- everybodyduck, "Walk the Plank"
+------------------------------------------------------------
| Outlaw Junk Email! Support HR 1748 (www.cauce.org)

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
William Stearns | 2 Mar 01:13 2004
Picon

Re: Overhead of UML-skas

Good evening, George,

On Mon, 1 Mar 2004, George Washington Dunlap III wrote:

> Hey Jeff (and any other interested parties) -- this is George Dunlap, from
> the CoVirt group at U of M.  I've been testing the overhead of running
> workloads under UML compared to on the bare host, and we're getting some
> unexpectedly slow numbers -- for the particular benchmark we're using,
> about 105% overhead;  I was wondering if you could shed any light on the
> subject: has anyone had similar experiences, and are there any obvious 
> optimizations we're missing.

	Do the boot time messages say it's actually going into skas mode?
	Do you have tmpfs mounted on /tmp, with enough potential space for 
all virtual machines?  
http://www.stearns.org/slartibartfast/uml-coop.current.html#host

> 
> We're using 2.4.20-7um, on a 2.4.18 host with the skas patch.  UML has 
> raw access to its own disk (via 'raw /dev/raw/raw1 /dev/hdc'), and is 
> given 256M (out of 1Gig host memory).  Asyncronous I/O is enabled via the 
> helper process.  COW disk mode is off.

	Helper process?
	BTW, any chance you have Synchronous mode turned on for ubd?  
Please make sure that's off in your kernel compile.
	Cheers,
	- Bill

---------------------------------------------------------------------------
        "According to the study, the three-year cost of a 100,000-hit
processing unit was significantly different among the systems: 
Solaris: $561,520
Windows: $190,662
Linux: $74,475"
	(A processing unit is the number of servers that would be
required to process 100,000 hits per day)
http://techupdate.zdnet.com/techupdate/stories/main/0,14179,2907876-3,00.html
--------------------------------------------------------------------------
William Stearns (wstearns <at> pobox.com).  Mason, Buildkernel, freedups, p0f,
rsync-backup, ssh-keyinstall, dns-check, more at:   http://www.stearns.org
--------------------------------------------------------------------------

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
Jeff Dike | 2 Mar 02:00 2004

Re: problems with UML, issues with includes

cfriesen <at> nortelnetworks.com said:
> 1) How do I fix the build  process to pick up the kernel includes (and
> why doesn't it do that by  default?).  

You don't.  The host's libc headers and the UML pool's kernel headers are
fundamentally incompatible.  You can't mix them, as you're trying to do
by including sched.h into a userspace file.

> 2) Any ideas why I'm getting
> the descriptor thing?

No, but get a stack trace or two from that printk, and that should help figure
it out.

				Jeff

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
Jeff Dike | 2 Mar 02:11 2004

Re: [PATCH] fix writing into /dev/kmem

blaisorblade_spam <at> yahoo.it said:
> the i386 Oopses, normally, kill only the thread which triggered the
> fault -  while instead Uml panics altogether. Cannot this be changed
> at  arch/um/kernel/trap_kern.c:segv()? 

If there's an unexplained kernel mode access fault, anything could be wrong.

I don't see that it's reasonable to just kill the process when kernel data
could be corrupted as far as we know.

I don't know why x86 thinks it can just kill the process.

> By the way: in handle_page_fault(), there is some dead code (attached
> is the  removal patch).

That shouldn't be dead code.  I think it should be attached to the VM_FAULT_OOM
case - I copied it from x86, so check there to be sure.

> I also do not understand the loop around handle_mm_fault call, but I
> could be  wrong: are you sure that after a successful handle_mm_fault
> (i.e. a major or  minor fault) pte_present(*pte) could be false? If
> handle_mm_fault is not  successful, we exit the loop anyway. 

It's possible that the page could have been swapped out between fixing the
fault and the return from handle_mm_fault.  Way back in history, I had a 
check for the same fault happening twice in a row, and panicing if it happened.
This was when UML's fault handling still needed debugging.  To prevent the
case I just mentioned from triggering that panic, I added the loop to make sure
the page was good before returning to userspace.

				Jeff

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
Picon

Re: Overhead of UML-skas

On Mon, 1 Mar 2004, William Stearns wrote:
> 	Do the boot time messages say it's actually going into skas mode?
> 	Do you have tmpfs mounted on /tmp, with enough potential space for 
> all virtual machines?  
> http://www.stearns.org/slartibartfast/uml-coop.current.html#host
[snip]
> 	Helper process?
> 	BTW, any chance you have Synchronous mode turned on for ubd?  
> Please make sure that's off in your kernel compile.

Thanks for the quick response.

* SKAS mode: I didn't look specifically at the post messages in those
runs, but I'm using the same scripts and HD image (and getting similar
numbers for UML) for the last 3-4 months.  Plus, TT mode is disabled in
the config.  The most recent run (on a different benchmark) did say:
 Checking for the skas3 patch in the host...found
 Checking for /proc/mm...found

I've been getting those kinds of numbers for awhile; I was only shocked 
when I finally ran numbers on the host and found out how much faster it 
was. =)

* /tmp: I wasn't using tmpfs, but I had ramfs mounted on /tmp/uml, and the
TMP environment variable set to it.  Again, I didn't verify it for this
particular run, but I had verified it some time ago when I set my
environment up.  I may try tmpfs at some point and see if there's any
performance difference.

Hm, it appears that one of my co-workers changed the scripts, and it
wasn't actually making things in /tmp/uml anymore!  Stand-by while I do a
quick test run with ramfs and see what we get...well, there doesn't seem
to be much difference, but I'll do some more controlled tests later
tonight.

* Async I/O: In order to do asyncronous I/O without a kernel that supports
asyncronous I/O, UML forks off a "helper process" that does the blocking
(i.e., guest kernel sends it a command; it does a read() and blocks; when
the read returns, it sends a message to the guest kernel that the data's
been read).

Our standard mode of operation is to have ayncronous I/O turned off by
default, because of the extra process that's created.  (It has to do with
the research we're doing right now.)  I explicitly enabled it for this
build, and verified that the helper process was being created. It resulted
in a marked speed increase (about 6% for this benchmark, if you're
interested).

Thanks for your time,
 -George

--

-- 
+-------------------+----------------------------------------
| dunlapg <at> umich.edu | http://www-personal.umich.edu/~dunlapg 
+-------------------+----------------------------------------
| "An empty life of luxury is still an empty life"
|    -- everybodyduck, "Walk the Plank"
+------------------------------------------------------------
| Outlaw Junk Email! Support HR 1748 (www.cauce.org)

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

Gmane