Re: [uml-devel] Question about trap handling in UML kernel

2007-04-11 Thread Jeff Dike
On Wed, Apr 11, 2007 at 07:10:36PM -0700, Haifeng He wrote: > I have a question about trap handling in UML kernel, particularly in the > skas0 mode. > My understanding is that, UML will fork a kernel thread for each user > process UML will fork a host process for each UML address space. > and >

[uml-devel] Question about trap handling in UML kernel

2007-04-11 Thread Haifeng He
Hi, All I have a question about trap handling in UML kernel, particularly in the skas0 mode. My understanding is that, UML will fork a kernel thread for each user process and this thread will go to a loop (in userspace()) and wait for signal from user process using ptrace. If a signal occurs, it

Re: [uml-devel] [PATCH 2/4] UML - Send pointers instead of structures to I/O thread

2007-04-11 Thread Jeff Dike
On Wed, Apr 11, 2007 at 01:05:16PM -0400, Gerb Stralko wrote: > Is this wrong? you declare io_reg as a pointer but then you pass him > to os_write_file_k by reference of a pointer? Should you just do this > instead: Intentional, I'm writing pointers, not structures, down the pipe. Tx for the re

Re: [uml-devel] [PATCH 2/4] UML - Send pointers instead of structures to I/O thread

2007-04-11 Thread Gerb Stralko
On 4/11/07, Jeff Dike <[EMAIL PROTECTED]> wrote: > Instead of writing entire structures between UML and the I/O thread, > we send pointers. This cuts down on the amount of data being copied > and possibly allows more requests to be pending between the two. > > - n = os_write

[uml-devel] [PATCH 0/4] UML - I/O improvements and small fixes

2007-04-11 Thread Jeff Dike
These are 2.6.22 material. Two of them are improvements to the block driver, one causes UML to dump core on a panic, and the other is a bug fix. Jeff -- Work email - jdike at linux dot intel dot com ---

[uml-devel] [PATCH 3/4] UML - Dump core on panic

2007-04-11 Thread Jeff Dike
Dump core after a panic. This will provide better debugging information than is currently available. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/include/os.h |1 + arch/um/kernel/um_arch.c |2 +- arch/um/os-Linux/util.c |6 ++ 3 files changed, 8 insertions(+), 1

[uml-devel] [PATCH 4/4] UML - Don't try to handle signals on initial process stack

2007-04-11 Thread Jeff Dike
Code running on the initial UML stack can't receive or process signals since current must be valid when IRQs are handled, and there is no current for this stack. So, instead of using UML_LONGJMP and UML_SETJMP, which are careful to save and restore signal state, and, as a side-effect, handle any d

[uml-devel] [PATCH 2/4] UML - Send pointers instead of structures to I/O thread

2007-04-11 Thread Jeff Dike
Instead of writing entire structures between UML and the I/O thread, we send pointers. This cuts down on the amount of data being copied and possibly allows more requests to be pending between the two. This requires that the requests be kmalloced and freed instead of living on the stack. Signed-

[uml-devel] [PATCH 1/4] UML - Batch I/O requests

2007-04-11 Thread Jeff Dike
Send as many I/O requests to the I/O thread as possible, even though it will still only handle one at a time. This provides an opportunity to reduce latency by starting one request before the previous one has been finished in the driver. Request handling is somewhat modernized by requesting sg pi