From: Rob L. <ro...@la...> - 2005-03-03 06:11:53
|
On Thursday 03 March 2005 03:22 am, Jeff Dike wrote: > Since 2.6.11 is out, it's time to decide what patches go into mainline > first. > > Here's my cut: Well, just in case your job was too easy, here's one more. Using the "quiet" option shows a couple of lines being printed out by printf that should be printed out by printk (so they'll _shut_up_ when you ask it to). signed-off-by: Rob Landley diff -ru linux-2.6.10/arch/um/kernel/mem_user.c linux-2.6.10-new/arch/um/kernel/mem_user.c --- linux-2.6.10/arch/um/kernel/mem_user.c 2005-02-15 08:16:48.000000000 -0600 +++ linux-2.6.10-new/arch/um/kernel/mem_user.c 2005-02-17 05:06:25.000000000 -0600 @@ -88,8 +88,8 @@ addr = mmap(NULL, UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0); - printf("Checking PROT_EXEC mmap in /tmp..."); - fflush(stdout); + /* Honor "quiet" option */ + printk("Checking PROT_EXEC mmap in /tmp..."); if(addr == MAP_FAILED){ err = errno; perror("failed"); @@ -97,7 +97,7 @@ printf("/tmp must be not mounted noexec\n"); exit(1); } - printf("OK\n"); + printk("OK\n"); munmap(addr, UM_KERN_PAGE_SIZE); os_close_file(fd); diff -ru linux-2.6.10/arch/um/kernel/tt/tracer.c linux-2.6.10-new/arch/um/kernel/tt/tracer.c --- linux-2.6.10/arch/um/kernel/tt/tracer.c 2005-02-15 08:16:49.000000000 -0600 +++ linux-2.6.10-new/arch/um/kernel/tt/tracer.c 2005-02-17 05:04:57.000000000 -0600 @@ -192,7 +192,7 @@ signal(SIGPIPE, SIG_IGN); setup_tracer_winch(); tracing_pid = os_getpid(); - printf("tracing thread pid = %d\n", tracing_pid); + printk("tracing thread pid = %d\n", tracing_pid); pid = clone(signal_tramp, sp, CLONE_FILES | SIGCHLD, init_proc); CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); > The skas0 stuff needs more baking. The os-dependent code movement I'm > going to sit on until we have it all in hand and can clean it up. I'm very interested in this (since I want to run UML on an unmodified host and TT mode means a gcc compile under UML has 2/3 of the CPU usage accounted to "system" instead of "user". Unfortunately, I can't find out where to go for more information. (Every time I'm pointed at your huge patch list I drown in x86-64 patches. Possibly breaking out the ones that ONLY affect a specific architecture or at least clearly marking them would be good...) Rob |