[uml-devel] Strange segmentation fault

2007-04-12 Thread Haifeng He
Hi, I met a program error when I tried to modify UML kernel. What I did was: 1. added a variable "a" in struct task_struct. 2. I wrote a function that will update the value of "a" in task struct "current", i.e., something like: foo () { current->a = xx. } 3. foo is called at many places.

[uml-devel] [ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers

2007-04-12 Thread Jeff Dike
Formatting fixes ahead of renaming os_{read_write}_file_k to os_{read_write}_file and fixing all the callers. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/drivers/chan_user.c | 11 --- arch/um/drivers/cow_sys.h | 17 +- arch/um/drivers/ubd_kern.c | 124 +

[uml-devel] [ PATCH 0/6 ] UML - Finish host file I/O fix, page fault speedup

2007-04-12 Thread Jeff Dike
These are 2.6.22 material. The first three finish getting rid of the bogus host file I/O code. It turns out that all callers of the old code could have just used the new code. I don't know why I was unable to log in when I earlier just did the quick and simple conversion. Patch 4 removes some de

[uml-devel] [ PATCH 4/6 ] UML - Remove debugging remnants

2007-04-12 Thread Jeff Dike
I accidentally left the remnants of some debugging in an earlier patch. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/kernel/tlb.c |3 --- 1 file changed, 3 deletions(-) Index: linux-2.6.21-mm/arch/um/kernel/tlb.c ===

[uml-devel] [ PATCH 3/6 ] UML - Rename os_{read_write}_file_k back to os_{read_write}_file

2007-04-12 Thread Jeff Dike
Rename os_{read_write}_file_k back to os_{read_write}_file, delete the originals and their bogus infrastructure, and fix all the callers. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/drivers/chan_kern.c |4 +-- arch/um/drivers/chan_user.c | 10 +++ arch/um/drivers

[uml-devel] [ PATCH 6/6 ] UML - Speed page fault path

2007-04-12 Thread Jeff Dike
Give the page fault code a specialized path. There is only one page to look at, so there's no point in going into the general page table walking code. There's only going to be one host operation, so there are no opportunities for merging. So, we go straight to the pte we want, figure out what ne

[uml-devel] [ PATCH 1/6 ] UML - Change remaining callers of os_{read_write}_file

2007-04-12 Thread Jeff Dike
Convert all remaining os_{read_write}_file users to use the simple {read,write} wrappers, os_{read_write}_file_k. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/drivers/chan_kern.c |4 ++-- arch/um/drivers/cow_sys.h |2 +- arch/um/drivers/net_user.c |6 +++--- arch/um/driv

[uml-devel] [ PATCH 5/6 ] UML - AIO deadlock avoidance

2007-04-12 Thread Jeff Dike
Allow deadlocks to be avoided in the AIO code by setting the pipe to the I/O thread non-blocking. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/os-Linux/aio.c |5 + 1 file changed, 5 insertions(+) Index: linux-2.6.21-mm/arch/um/os-Linux/aio.c ===