mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
[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>
This commit is contained in:
parent
f0fe253c47
commit
dd4cb9f8ac
1 changed files with 2 additions and 2 deletions
|
@ -493,7 +493,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
|
||||||
* numalink ports
|
* numalink ports
|
||||||
*/
|
*/
|
||||||
sz = obj->ports * sizeof(struct sn_hwperf_port_info);
|
sz = obj->ports * sizeof(struct sn_hwperf_port_info);
|
||||||
if ((ptdata = vmalloc(sz)) == NULL)
|
if ((ptdata = kmalloc(sz, GFP_KERNEL)) == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
|
e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
|
||||||
SN_HWPERF_ENUM_PORTS, obj->id, sz,
|
SN_HWPERF_ENUM_PORTS, obj->id, sz,
|
||||||
|
@ -541,7 +541,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
|
||||||
(SN_HWPERF_IS_NL3ROUTER(obj) ||
|
(SN_HWPERF_IS_NL3ROUTER(obj) ||
|
||||||
SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4");
|
SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4");
|
||||||
}
|
}
|
||||||
vfree(ptdata);
|
kfree(ptdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue