Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a18ff1bde0c3da9ece3ba60e6eae2ef87f91a12e
Commit:     a18ff1bde0c3da9ece3ba60e6eae2ef87f91a12e
Parent:     57ac895a7f22d235f637317f58a2d9ba6ec91a27
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:51:19 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:13:02 2007 -0700

    uml: speed up exec
    
    flush_thread doesn't need to do a full page table walk in order to clear the
    address space.  It knows what the end result needs to be, so it can call 
unmap
    directly.
    
    This results in a 10-20% speedup in an exec from bash.
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Cc: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/kernel/skas/exec.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/arch/um/kernel/skas/exec.c b/arch/um/kernel/skas/exec.c
index 54b7959..580eb64 100644
--- a/arch/um/kernel/skas/exec.c
+++ b/arch/um/kernel/skas/exec.c
@@ -17,7 +17,17 @@
 
 void flush_thread_skas(void)
 {
-       force_flush_all();
+       void *data = NULL;
+       unsigned long end = proc_mm ? task_size : CONFIG_STUB_START;
+       int ret;
+
+       ret = unmap(&current->mm->context.skas.id, 0, end, 1, &data);
+       if(ret){
+               printk("flush_thread_skas - clearing address space failed, "
+                      "err = %d\n", ret);
+               force_sig(SIGKILL, current);
+       }
+
        switch_mm_skas(&current->mm->context.skas.id);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to