aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2006-04-22 10:37:19 -0400
committerTony Luck <tony.luck@intel.com>2006-04-27 17:29:05 -0400
commitdd4cb9f8ac9717c9db2b2afc5a82cb95a3d5dec3 (patch)
tree94725efb2f8c1fc9272d1599bd7764bab9023228 /arch
parentf0fe253c4719faf76d40f581cdc0e8aef77273bb (diff)
[IA64-SGI] - Reduce overhead of reading sn_topology
MPI programs using certain debug options have a long startup time. This was traced to a "vmalloc/vfree" in the code that reads /proc/sgi_sn/sn_topology. On large systems, vfree requires an IPI to all cpus to do TLB purging. Replace the vmalloc/vfree with kmalloc/kfree. Although the size of the structure being allocated is unknown, it will not not exceed 96 bytes. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 7ec65bc0ccf6..739c948dc504 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -493,7 +493,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
493 * numalink ports 493 * numalink ports
494 */ 494 */
495 sz = obj->ports * sizeof(struct sn_hwperf_port_info); 495 sz = obj->ports * sizeof(struct sn_hwperf_port_info);
496 if ((ptdata = vmalloc(sz)) == NULL) 496 if ((ptdata = kmalloc(sz, GFP_KERNEL)) == NULL)
497 return -ENOMEM; 497 return -ENOMEM;
498 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid, 498 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
499 SN_HWPERF_ENUM_PORTS, obj->id, sz, 499 SN_HWPERF_ENUM_PORTS, obj->id, sz,
@@ -541,7 +541,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
541 (SN_HWPERF_IS_NL3ROUTER(obj) || 541 (SN_HWPERF_IS_NL3ROUTER(obj) ||
542 SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4"); 542 SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4");
543 } 543 }
544 vfree(ptdata); 544 kfree(ptdata);
545 } 545 }
546 546
547 return 0; 547 return 0;