login
Header Space

 
 

[IA64] fix personality(PER_LINUX32) performance issue

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Thursday, May 15, 2008 - 5:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=839052...
Commit:     839052d27e8db0c1545256fe5827abcd00fb51c5
Parent:     3fb2c74ee20b77affd494c6b8ce7928d0ebbb62e
Author:     Huang, Xiaolan <xiaolan.huang@intel.com>
AuthorDate: Thu May 15 10:18:41 2008 +0800
Committer:  Tony Luck <tony.luck@intel.com>
CommitDate: Thu May 15 09:54:19 2008 -0700

    [IA64] fix personality(PER_LINUX32) performance issue
    
    The patch aims to fix a performance issue for the syscall
    personality(PER_LINUX32).
    
    On IA-64 box, the syscall personality (PER_LINUX32) has poor performance
    because it failed to find the Linux/x86 execution domain. Then it tried
    to load the kernel module however it failed always and it used the default
    execution domain PER_LINUX instead. Requesting kernel modules is very
    expensive. It caused the performance issue. (see the function
    lookup_exec_domain in kernel/exec_domain.c).
    
    To resolve the issue, execution domain Linux/x86 is always registered in
    initialization time for IA-64 architecture.
    
    Signed-off-by: Xiaolan Huang <xiaolan.huang@intel.com>
    Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 arch/ia64/ia32/ia32_support.c |   10 ----------
 arch/ia64/mm/init.c           |   25 +++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c
index 896b1eb..a6965dd 100644
--- a/arch/ia64/ia32/ia32_support.c
+++ b/arch/ia64/ia32/ia32_support.c
@@ -15,7 +15,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mm.h>
-#include <linux/personality.h>
 #include <linux/sched.h>
 
 #include <asm/intrinsics.h>
@@ -29,7 +28,6 @@
 
 extern int die_if_kernel (char *str, struct pt_regs *regs, long err);
 
-struct exec_domain ia32_exec_domain;
 struct page *ia32_shared_page[NR_CPUS];
 unsigned long *ia32_boot_gdt;
 unsigned long *cpu_gdt_table[NR_CPUS];
@@ -240,14 +238,6 @@ ia32_cpu_init (void)
 static int __init
 ia32_init (void)
 {
-	ia32_exec_domain.name = "Linux/x86";
-	ia32_exec_domain.handler = NULL;
-	ia32_exec_domain.pers_low = PER_LINUX32;
-	ia32_exec_domain.pers_high = PER_LINUX32;
-	ia32_exec_domain.signal_map = default_exec_domain.signal_map;
-	ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
-	register_exec_domain(&ia32_exec_domain);
-
 #if PAGE_SHIFT > IA32_PAGE_SHIFT
 	{
 		extern struct kmem_cache *ia64_partial_page_cachep;
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index fc6c663..200100e 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -719,3 +719,28 @@ out:
 EXPORT_SYMBOL_GPL(remove_memory);
 #endif /* CONFIG_MEMORY_HOTREMOVE */
 #endif
+
+/*
+ * Even when CONFIG_IA32_SUPPORT is not enabled it is
+ * useful to have the Linux/x86 domain registered to
+ * avoid an attempted module load when emulators call
+ * personality(PER_LINUX32). This saves several milliseconds
+ * on each such call.
+ */
+static struct exec_domain ia32_exec_domain;
+
+static int __init
+per_linux32_init(void)
+{
+	ia32_exec_domain.name = "Linux/x86";
+	ia32_exec_domain.handler = NULL;
+	ia32_exec_domain.pers_low = PER_LINUX32;
+	ia32_exec_domain.pers_high = PER_LINUX32;
+	ia32_exec_domain.signal_map = default_exec_domain.signal_map;
+	ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
+	register_exec_domain(&ia32_exec_domain);
+
+	return 0;
+}
+
+__initcall(per_linux32_init);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[IA64] fix personality(PER_LINUX32) performance issue, Linux Kernel Mailing List..., (Thu May 15, 5:00 pm)
speck-geostationary